Usage
Syntax: move(float dx, float dy, float time(speed), int options)

Explanation

Causes the NPC to move in the given direction within the defined time. The movement vector is specified through dx and dy (delta X and Y), which specify the difference in position that the move should perform, i.e. delta X of 2 and delta Y of -2 with a time of 1 will move the NPC two tiles right and two tiles up over a 1 second period.

Options:
cachtype(0,1,2) + blockcheck(4) + eventwhendone(8) + applydir(16)

Example

//#CLIENTSIDE
function onCreated()
{
  temp.dx = 1;
  temp.dy = 2;
  temp.time = 0.5;
  this.move(dx, dy, time, 0);
}

... Will move the NPC one x to the right and two y down.

Categories

CategoryObjectFunction
CategoryFunctionClientside

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki