1
Mega Tokyo AGI Archive / Re:NPC
« on: October 11, 2004, 11:45:19 AM »
I suppose you know how to load a view and set it to a object. Then just use:
start.cycling(object); //will start the animation (walking)
move.obj(object, x, y, step, flag);
x & y are the positions to walk to. When char. reaches that point the glaf is set. The step is a number that shows how many pixels it will move in one cycle. Usually it's 1.
to check if player reached the x & y, use:
if(isset(flag)){
reset(flag)
stop.cycling(object);
print("You have reached your destination.");
}
-Eigen
start.cycling(object); //will start the animation (walking)
move.obj(object, x, y, step, flag);
x & y are the positions to walk to. When char. reaches that point the glaf is set. The step is a number that shows how many pixels it will move in one cycle. Usually it's 1.
to check if player reached the x & y, use:
if(isset(flag)){
reset(flag)
stop.cycling(object);
print("You have reached your destination.");
}
-Eigen