Because it is moving in such a weird behavior,
a normal distance script command, or Pythagoras distance check isn't accurate
When input X +5, Y -10, phythagoras distance function expected 1650 mili-seconds,
but travel_time function expected 1800 mili-seconds
the result is 1872 mili-seconds
Thus travel_time function should be use instead,
simple, just (2min)² + (max - min) where min is X or Y, which one is smaller, and the opposite for max
See also:
Ragnarok Online use number of Squares to count distanceA simple walking npc script
can u add damage %(like a MatkRate,AtkRate) when npc move pass a player body ?
ReplyDelete