am i looking at the correct part here is the code it gives as an example taken from the SED help file:
// move along a path loop
// uses _FORCE, _MOVEMODE
action patrol_path
{
// attach entity to nearest path
result = path_scan(me,my.x,my.pan,vector(360,180,1000);
if (result == 0) { return; } // no path found
// find first waypoint
var node = 1; // start at first node
path_nodepos(my,node,my._TARGET_X);
while (my._MOVEMODE)
{
// find direction
result = vec_to_angle(angle,vec_diff(temp,my._TARGET_X,my.x));
// near target? Find next waypoint of the path
if (result < 25) {
node = path_nextnode(my,node,1);
path_nodepos(my,node,my._TARGET_X);
}
// turn and walk towards target
actor_turnto(angle.PAN);
actor_moveahead(MY._FORCE);
wait(1);
}
}
I have never really done any scripting in this before so please bear with me :-)