Tuesday, January 29, 2019

Units move diagonally then move in straight line

I'm sure those who have play firewall mage understand this
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 distance  
A simple walking npc script

1 comment:

  1. can u add damage %(like a MatkRate,AtkRate) when npc move pass a player body ?

    ReplyDelete

Linux compiler error that never shown on Visual Studio

let's just admit Visual Studio sux ... ok ? right now, if you want to host a Private Ragnarok Online server, its just better to choose...