From Stealth Client

Jump to: navigation, search


CalcDir

function CalcDir(Xfrom, Yfrom, Xto, Yto:Integer):Byte

Returns the direction for the step from point(Xfrom, Yfrom) to the point(Xto, Yto). If Xfrom = Xto and Yfrom = Yto function will return 100.

Example 1:

Step(CalcDir(GetX(Self), GetY(Self), GetX(Self) +1, GetY(Self)), True);