brauche hilfe beim Path Finding Script
Hi ich bräuchte jemanden der mir das Path Finding Script etwas umschreibt. Falls ihr das Skript nicht kennt: Es lässt den Actor automatisch zu einem Punkt auf der Map laufen dessen Koordinaten man angibt.
Wenn man Koordinaten angibt auf denen schon ein Event steht, dann bewegt sich der Actor nicht. Stattdessen kommt ein benachrichtigungsfenster in dem steht, dass dieses feld nicht begehbar ist (was auch von skripter so beabsichtigt ist) wenn ich aber koordinaten eingebe wo ein nicht begehbarer Tile ist, dann geht der actor dorthin und bleibt bei dem nächsten begehbaren feld stehen (geht also so nah wie möglich an das nicht begehbare tile heran).
ich würde es toll finden wenn jemand das skript so umschreiben könnte, dass es sich bei den Events genauso verhält, d.h. dass der actor zu einem benachbarten feld des events geht anstatt dass er stehen bleibt und diese benachrichtigung kommt.
Hier ist der Quellcode:
ich würde mich sehr freuen wenn jemand das skript entsprechend umschreiben könnte.
danke im vorraus
Wenn man Koordinaten angibt auf denen schon ein Event steht, dann bewegt sich der Actor nicht. Stattdessen kommt ein benachrichtigungsfenster in dem steht, dass dieses feld nicht begehbar ist (was auch von skripter so beabsichtigt ist) wenn ich aber koordinaten eingebe wo ein nicht begehbarer Tile ist, dann geht der actor dorthin und bleibt bei dem nächsten begehbaren feld stehen (geht also so nah wie möglich an das nicht begehbare tile heran).
ich würde es toll finden wenn jemand das skript so umschreiben könnte, dass es sich bei den Events genauso verhält, d.h. dass der actor zu einem benachbarten feld des events geht anstatt dass er stehen bleibt und diese benachrichtigung kommt.
Hier ist der Quellcode:
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
#==============================================================================
# â– Path Finding
#==============================================================================
# Near Fantastica
# Version 1
# 29.11.05
#==============================================================================
# Lets the Player or Event draw a path from an desonation to the source. This
# method is very fast and because the pathfinding is imbedded into the Game
# Character the pathfinding can be interrupted or redrawn at any time.
#==============================================================================
# Player :: $game_player.find_path(x,y)
# Event Script Call :: self.event.find_path(x,y)
# Event Movement Script Call :: self.find_path(x,y)
#==============================================================================
class Game_Character
#--------------------------------------------------------------------------
alias nf_pf_game_character_initialize initialize
alias nf_pf_game_character_update update
#--------------------------------------------------------------------------
attr_accessor :map
attr_accessor :runpath
#--------------------------------------------------------------------------
def initialize
nf_pf_game_character_initialize
@map = nil
@runpath = false
end
#--------------------------------------------------------------------------
def update
run_path if @runpath == true
nf_pf_game_character_update
end
#--------------------------------------------------------------------------
def run_path
return if moving?
step = @map[@x,@y]
if step == 1
@map = nil
@runpath = false
return
end
dir = rand(2)
case dir
when 0
move_right if @map[@x+1,@y] == step - 1 and step != 0
move_down if @map[@x,@y+1] == step - 1 and step != 0
move_left if @map[@x-1,@y] == step -1 and step != 0
move_up if @map[@x,@y-1] == step - 1 and step != 0
when 1
move_up if @map[@x,@y-1] == step - 1 and step != 0
move_left if @map[@x-1,@y] == step -1 and step != 0
move_down if @map[@x,@y+1] == step - 1 and step != 0
move_right if @map[@x+1,@y] == step - 1 and step != 0
end
end
#--------------------------------------------------------------------------
def find_path(x,y)
sx, sy = @x, @y
result = setup_map(sx,sy,x,y)
@runpath = result[0]
@map = result[1]
@map[sx,sy] = result[2] if result[2] != nil
end
#--------------------------------------------------------------------------
def clear_path
@map = nil
@runpath = false
end
#--------------------------------------------------------------------------
def setup_map(sx,sy,ex,ey)
map = Table.new($game_map.width, $game_map.height)
map[ex,ey] = 1
old_positions = []
new_positions = []
old_positions.push([ex, ey])
depth = 2
depth.upto(100){|step|
loop do
break if old_positions[0] == nil
x,y = old_positions.shift
return [true, map, step] if x == sx and y+1 == sy
if $game_player.passable?(x, y, 2) and map[x,y + 1] == 0
map[x,y + 1] = step
new_positions.push([x,y + 1])
end
return [true, map, step] if x-1 == sx and y == sy
if $game_player.passable?(x, y, 4) and map[x - 1,y] == 0
map[x - 1,y] = step
new_positions.push([x - 1,y])
end
return [true, map, step] if x+1 == sx and y == sy
if $game_player.passable?(x, y, 6) and map[x + 1,y] == 0
map[x + 1,y] = step
new_positions.push([x + 1,y])
end
return [true, map, step] if x == sx and y-1 == sy
if $game_player.passable?(x, y, 8) and map[x,y - 1] == 0
map[x,y - 1] = step
new_positions.push([x,y - 1])
end
end
old_positions = new_positions
new_positions = []
}
return [false, nil, nil]
end
end
class Game_Map
#--------------------------------------------------------------------------
alias pf_game_map_setup setup
#--------------------------------------------------------------------------
def setup(map_id)
pf_game_map_setup(map_id)
$game_player.clear_path
end
end
class Game_Player
#--------------------------------------------------------------------------
alias pf_game_player_update update
#--------------------------------------------------------------------------
def update
$game_player.clear_path if Input.dir4 != 0
pf_game_player_update
end
end
class Interpreter
#--------------------------------------------------------------------------
def event
return $game_map.events[@event_id]
end
end |
zum Lesen den Text mit der Maus markieren
ich würde mich sehr freuen wenn jemand das skript entsprechend umschreiben könnte.
danke im vorraus
Also, da wo ich mal schon dabei war, habe ich das Teil gleich komplett neu geschrieben. Dein Wunsch war nicht leicht umzusetzen und es ist auch nur so gut umgesetzt wie ich es konnte (das ist also keine perfekte Lösung). Nur ein großes Problem ist neu aufgetaucht:
Wenn du auf einen Punkt laufen willst und außen herum sind nur nicht begehbare Felder (zu welchen ja so nah wie nur möglich hingegangen werden soll), wird solange nach einer Lösung gesucht, bis endgültig feststeht, dass es keinen Weg gibt, dann wird von den begehbaren Feldern das am nahegelegensten Feld relativ zu dem Feld wo du hin willst herausgesucht und zu diesem die Moveroute errechnet (das ganze kann die Rechenzeit bei großen Maps vervielfacht).
Dieses Script ist also eher nur für kleine Maps geeignet.
Fals du auf die Funktion verzichtest und du nur zu Feldern hingehen willst, welche nicht begehbar sind, außenherum aber mindestens 1 Feld erreichbar ist, fallen diese Berechnungszeiten weg (bei Feldern die ganz normal begehbar sind, gilt dies sowieso).
(bei 40*40 Feldern braucht der Maker, wenn du doch von der Funktion gebrauch machst, etwa 4-5 Sekunden für die Berechnung der besten Moveroute + der Berechnung des nahgelegenstem Feld)
Die Bedienung ist die selbe wie bei deinem Script.
EDIT:
Ich habe jetzt noch etwas im Script hinzugefügt, was das oben genannte Problem zumindest teils verschwinden lässt. Man kann jetzt noch zusätzlich ein Rect als Parameter angeben. Die Werte die in diesem Rect gespeichert sind, kann man, wenn man will, als Tollerranzmaße sehen. Diese Tolleranzmaße werden je nach dem wie das Targetfeld relativ zum Character steht zu den jeweiligen Coordinaten hinzuaddiert bzw. subtrahiert (x und y im Rect werden zu den Koordinaten des Targetfeldes hinzuaddiert bzw. subtrahiert das selbe gilt für den Character mit width und height ). Jetzt wird nur noch überprüft ob es in diesem Rechteck einen Weg zu dem Feld gibt und gleich danach das am nahegelegenste begehbare Feld (relativ zum Targetfeld) in diesem Rechteck zurück gegeben. Rand der Operation ist also nicht mehr die Map, sondern nur noch dieses Rechteck, was sehr viel Performance einsparen kann. (keine der Werte im Rect sollten negativ sein!)
Wenn du auf einen Punkt laufen willst und außen herum sind nur nicht begehbare Felder (zu welchen ja so nah wie nur möglich hingegangen werden soll), wird solange nach einer Lösung gesucht, bis endgültig feststeht, dass es keinen Weg gibt, dann wird von den begehbaren Feldern das am nahegelegensten Feld relativ zu dem Feld wo du hin willst herausgesucht und zu diesem die Moveroute errechnet (das ganze kann die Rechenzeit bei großen Maps vervielfacht).
Dieses Script ist also eher nur für kleine Maps geeignet.
Fals du auf die Funktion verzichtest und du nur zu Feldern hingehen willst, welche nicht begehbar sind, außenherum aber mindestens 1 Feld erreichbar ist, fallen diese Berechnungszeiten weg (bei Feldern die ganz normal begehbar sind, gilt dies sowieso).
(bei 40*40 Feldern braucht der Maker, wenn du doch von der Funktion gebrauch machst, etwa 4-5 Sekunden für die Berechnung der besten Moveroute + der Berechnung des nahgelegenstem Feld)
Die Bedienung ist die selbe wie bei deinem Script.
|
|
Ruby Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
#################################### # Pathfinding by Reborn | # v.2.1 | #################################### ################################################################################ # Pathfinding # Features: # - when no way was found the closest node will be used # - very intiligent # - blocks away dynamic, a new way is calculated (optional) # - if no new way to calculate, he is waiting for # - and random pathes (optional) (this features slows the computationally) # - very very fast by using the A*-Algo in combination with a binary heap # a way in a grid with 500x500 nodes is, without random, in ~0.117 sec # calculated with random in ~0.118 sec # # Instructions: # to send one of events to a way, call: # charachter.find_path(x, y[, flags]) # # # you can get a character like this: # character = $game_map.events[id] # or: # character = $game_player # or you call it in a event call script: # character = event # (for self character) # # # flags are the switches for using the new_calculate and the random - feature # to use the random feature: # character.find_path(x, y, Pathfinder::RANDOM) # # to use the new_calculate feature: # character.find_path(x, y, Pathfinder::NEW_CALC) # # to use both of them: # character.find_path(x, y, Pathfinder::RANDOM | Pathfinder::NEW_CALC) # # to stop fallowing a path invoke: # character.clear_path() # ################################################################################ # thanks goes to =Kai= ################################################################################ ################################################################################ # Changelog | ################################################################################ # v.2.0 # - revised a star algorithm # - revised closed list # - revised passable? - method # - revised binary heap # - a grid with 350 * 350 nodes and random now takes time less then 0.08 sec. ################################################################################ class Time def get_total_time() return hour * 60 * 60 * 1000000 + min * 60 * 1000000 + sec * 1000000 + usec end end module Graphics class << self alias_method(:old_update_28_11_12, :update) end def self.update() old_update_28_11_12 @last_frame = Time.now end def self.last_frame() return 0.0 unless @last_frame return Time.now() - @last_frame end end module Pathfinder class BinaryHeap < Array def initialize() super() end def replace(index, newObject) self[index] = newObject sort(index) end def push(*args) result = super(*args) quick_sort() return result end def <<(*args) push(*args) end def remove(index=0) temp = self[index] if size() > 1 self[index] = pop() sort(index) elsif size() == 1 clear() end return temp end def sort(y) x = y keyc = self[x][0] if size() > x * 2 + 2 keyl = self[x * 2 + 1][0] keyr = self[x * 2 + 2][0] if keyl >= keyr if keyc > keyr y = x * 2 + 2 end elsif keyc > keyl y = x * 2 + 1 end elsif size() > x * 2 + 1 keyl = self[x * 2 + 1][0] if keyc > keyl y = x * 1 + 1 end end return if x == y self[x], self[y] = self[y], self[x] sort(y) end def quick_sort() return if size() < 2 index = size() - 1 while index > 0 temp = self[index / 2] break if self[index][0] > temp[0] self[index / 2] = self[index] self[index] = temp index /= 2 end end private :sort, :quick_sort, :[] end RANDOM = 1 NEW_CALC = 2 class Pathfinder attr_reader :new_calculation, :random def initialize(character, target_node, flags=0) unless target_node[2].between?(0, $game_map.width) || target_node[3].between?(0, $game_map.height) raise "X or Y bigger than the mapsize!" end @character = character @target = target_node @passable_target = @character.passable?(@target[2], @target[3], 0) @random = flags & RANDOM == RANDOM @new_calculation = flags & NEW_CALC == NEW_CALC @closed_list = Table.new($game_map.width, $game_map.height) @open_list = BinaryHeap.new() @move_route = Array.new() end def init_closed_list() @closed_list = Table.new(@closed_list.xsize, @closed_list.ysize) unless $game_player.through @closed_list[$game_player.x, $game_player.y] = -1 end $game_map.events.values.each do |i| unless i.through @closed_list[i.x, i.y] = -1 end end end def calculate_path() init_closed_list() @start = [0, 0, @character.x, @character.y] @current = @start @open_list.clear() @move_route.clear() @open_list.push(@current) @nearest = [99999999999, 0, 0, 0] until @open_list.empty? Graphics.update() if Graphics.last_frame > 1 @current = get_current() if @passable_target if @current[2, 3] == @target[2, 3] create_move_route() return end else delta_x = (@current[2] - @target[2]).abs() delta_y = (@current[3] - @target[3]).abs() if (delta_x + delta_y) == 1 @target = @current create_move_route() return end end expand_node() if @current[1] > 0 @nearest = @current if @current[0] - @current[1] <= @nearest[0] - @nearest[1] end end @target = @nearest create_move_route() end def get_current() return @open_list.remove() end def expand_node() get_possible_moves.each do |i| if passable?(i[2], i[3]) && @closed_list[i[2], i[3]].zero? @open_list.push(i) @closed_list[i[2], i[3]] = i[1] end end end def get_possible_moves() node = @current nodes = Array.new() x, y = Array.new(), Array.new() cost = node[1] + 1 x[0], y[0] = node[2], node[3] - 1 x[1], y[1] = node[2] - 1, node[3] x[2], y[2] = node[2] + 1, node[3] x[3], y[3] = node[2], node[3] + 1 score = Array.new(4) {|i| get_heuristic(x[i], y[i]) + cost} nodes_col = Array.new(4) {|i| [score[i], cost, x[i], y[i]]} passables = Array.new(4) {|i| passable?(x[i], y[i])} if @random case rand(2) when 0 then 0.upto(3) {|i| nodes << nodes_col[i] if passables[i]} when 1 then 3.downto(0) {|i| nodes << nodes_col[i] if passables[i]} end else 0.upto(3) {|i| nodes << nodes_col[i] if passables[i]} end return nodes end def passable?(x, y) d = get_direction(@current[2], @current[3], x, y) return $game_map.map_passable?(x, y, d) && @closed_list[x, y].zero? end def get_direction(x1, y1, x2, y2) return 2 if y1 > y2 return 4 if x1 < x2 return 6 if x1 > x2 return 8 if y1 < y2 return 0 end def get_heuristic(x, y) return (x - @target[2]).abs() + (y - @target[3]).abs() end def target?(x, y) return @target[2] == x && @target[3] == y end def get_next_dir() return @move_route[-1] end def pop_last_dir() return @move_route.pop() end def create_move_route() x, y = @target[2], @target[3] old_x = old_y = -1 while (a = @start[2] - x).abs() + (b = @start[3] - y).abs() > 1 break if x == old_x && y == old_y old_x, old_y = x, y cost = @closed_list[x, y] cmr_cl_col = Hash.new() cmr_cl_col[2] = cmr_cl(x, y - 1, cost) cmr_cl_col[4] = cmr_cl(x + 1, y, cost) cmr_cl_col[6] = cmr_cl(x - 1, y, cost) cmr_cl_col[8] = cmr_cl(x, y + 1, cost) if @random case rand(2) when 0 then [2, 4, 6, 8].each do |i| if cmr_cl_col[i] @move_route << i x, y = in_dekrement_xy(i, x, y) end end when 1 then [8, 6, 4, 2].each do |i| if cmr_cl_col[i] @move_route << i x, y = in_dekrement_xy(i, x, y) end end end else [2, 4, 6, 8].each do |i| if cmr_cl_col[i] @move_route << i x, y = in_dekrement_xy(i, x, y) end end end end @move_route << 2 if b == -1 @move_route << 4 if a == 1 @move_route << 6 if a == -1 @move_route << 8 if b == 1 end def in_dekrement_xy(i, x, y) case i when 2 then return x, y - 1 when 4 then return x + 1, y when 6 then return x - 1, y when 8 then return x, y + 1 end end def cmr_cl(x, y, cost) return false unless x.between?(0, @closed_list.xsize - 1) return false unless y.between?(0, @closed_list.ysize - 1) @closed_list[x, y] > 0 && @closed_list[x, y] == cost - 1 end end end class Game_Map def map_passable?(x, y, d) unless valid?(x, y) return false end bit = (1 << (d / 2 - 1)) & 0x0f for i in [2, 1, 0] tile_id = data[x, y, i] if tile_id.nil? return false elsif @passages[tile_id] & bit != 0 return false elsif @passages[tile_id] & 0x0f == 0x0f return false elsif @priorities[tile_id].zero? return true end end return true end end class Game_Character alias nf_pf_game_character_initialize initialize alias nf_pf_game_character_update update def initialize() nf_pf_game_character_initialize @runpath = false @pathfinder = [] end def update() run_path if @runpath nf_pf_game_character_update end def run_path return if moving? if @pathfinder.target?(@x, @y) @runpath = false delta_x = @x - @pf_last_x delta_y = @y - @pf_last_y if delta_x.zero? && delta_y.zero? return end if delta_x.abs() > delta_y.abs() delta_x > 0 ? turn_left : turn_right else delta_y > 0 ? turn_up : turn_down end return end dir = @pathfinder.get_next_dir() case dir when 2 then unless passable?(@x, @y + 1, 0) if @pathfinder.new_calculation && !@pathfinder.target?(@x, @y + 1) @pathfinder.calculate_path() end return end move_down when 4 then unless passable?(@x - 1, @y, 0) if @pathfinder.new_calculation && !@pathfinder.target?(@x - 1, @y) @pathfinder.calculate_path() end return end move_left() when 6 then unless passable?(@x + 1, @y, 0) if @pathfinder.new_calculation && !@pathfinder.target?(@x + 1, @y) @pathfinder.calculate_path() end return end move_right() when 8 then unless passable?(@x, @y - 1, 0) if @pathfinder.new_calculation && !@pathfinder.target?(@x, @y - 1) @pathfinder.calculate_path() end return end move_up() end @pathfinder.pop_last_dir() end def find_path(x, y, flags=0) @pf_last_x, @pf_last_y = x, y @pathfinder = Pathfinder::Pathfinder.new(self, [0, 0, x, y], flags) @pathfinder.calculate_path() @runpath = true end def clear_path() @runpath = false @pathfinder = nil end end class Game_Player alias pf_game_player_update update def update $game_player.clear_path() if Input.dir4 != 0 pf_game_player_update end end class Interpreter def event return $game_map.events[@event_id] end end |
zum Lesen den Text mit der Maus markieren
EDIT:
Ich habe jetzt noch etwas im Script hinzugefügt, was das oben genannte Problem zumindest teils verschwinden lässt. Man kann jetzt noch zusätzlich ein Rect als Parameter angeben. Die Werte die in diesem Rect gespeichert sind, kann man, wenn man will, als Tollerranzmaße sehen. Diese Tolleranzmaße werden je nach dem wie das Targetfeld relativ zum Character steht zu den jeweiligen Coordinaten hinzuaddiert bzw. subtrahiert (x und y im Rect werden zu den Koordinaten des Targetfeldes hinzuaddiert bzw. subtrahiert das selbe gilt für den Character mit width und height ). Jetzt wird nur noch überprüft ob es in diesem Rechteck einen Weg zu dem Feld gibt und gleich danach das am nahegelegenste begehbare Feld (relativ zum Targetfeld) in diesem Rechteck zurück gegeben. Rand der Operation ist also nicht mehr die Map, sondern nur noch dieses Rechteck, was sehr viel Performance einsparen kann. (keine der Werte im Rect sollten negativ sein!)
Mehr als a Allgäuer ka a Mensch it wera.
Wie soll ich wissen was ich denke, bevor ich nicht höre was ich sage?
NES-Emulator - a simple NES-Emulator
ERDL - a embedded Ruby Interpreter with the abilltiy to render images with DirectX ERDL shall be 100% compatible to RPGXP-Ruby Scripts
ERDL - a embedded Ruby Interpreter with the abilltiy to render images with DirectX ERDL shall be 100% compatible to RPGXP-Ruby Scripts
zum Lesen den Text mit der Maus markieren
Dieser Beitrag wurde bereits 8 mal editiert, zuletzt von »Reborn« (29. Januar 2013, 20:38)
Also, ich habe das Skript eingebaut und ausprobiert. Allerdings scheint die bedienung nicht die selbe zu sein wie bei dem skript welches ich davor benutzt habe. Ich habe folgendes Call Script in meinem Event verwendet:
Diesen Call Script-Befehl habe ich nicht verändert nachdem ich dein Skript eingebaut habe. Als das Event ausgeführt wurde bekam ich die Fehlermeldung:
"NoMethodError occured while running Script.
undefined method 'setup_player' for: nil:NilClass"
Es wäre sehr nett wenn du mir noch die richtige bedienung deines Skript verraten könntest
Diesen Call Script-Befehl habe ich nicht verändert nachdem ich dein Skript eingebaut habe. Als das Event ausgeführt wurde bekam ich die Fehlermeldung:
"NoMethodError occured while running Script.
undefined method 'setup_player' for: nil:NilClass"
Es wäre sehr nett wenn du mir noch die richtige bedienung deines Skript verraten könntest
Dann hast du mir aber nicht das komplette Pathfindingscript von dir geschickt, auf jeden Fall kannst du es jetzt so aufrufen:
Das rect ist dabei nur optional.
|
|
Ruby Quellcode |
1 |
event.find_path(x, y{, rect]) |
Das rect ist dabei nur optional.
Mehr als a Allgäuer ka a Mensch it wera.
Wie soll ich wissen was ich denke, bevor ich nicht höre was ich sage?
NES-Emulator - a simple NES-Emulator
ERDL - a embedded Ruby Interpreter with the abilltiy to render images with DirectX ERDL shall be 100% compatible to RPGXP-Ruby Scripts
ERDL - a embedded Ruby Interpreter with the abilltiy to render images with DirectX ERDL shall be 100% compatible to RPGXP-Ruby Scripts
zum Lesen den Text mit der Maus markieren
Ähnliche Themen
-
Skript-Anfragen »-
NPC soll weg selbst finden
(23. Oktober 2009, 14:52)
-
Skript-Anfragen »-
NPC soll weg selbst finden
(23. Oktober 2009, 14:52)
-
Skript-Anfragen »-
NPC soll weg selbst finden
(23. Oktober 2009, 14:52)
-
Einsteigerhilfe »-
Events mit Route, die Koordinaten ansteuern?
(22. Dezember 2008, 10:49)
-
Einsteigerhilfe »-
Move Route - Script
(9. Oktober 2008, 18:12)
