action patrol_path()
{
VECTOR path_nodepos ;
VECTOR temp ;
result = path_scan(me,my.x,my.pan,vector(360,180,1000));
if (result == 0) { return; }
var node = 1;
path_nodepos(my,node,my.skill20);
while (1)
{
var angle[3];
result = vec_to_angle(angle,vec_diff(temp,my.skill20,my.x));
if (result < 25) {
node = path_nextnode(my,node,1);
path_nodepos(my,node,my._TARGET_X);
}
my.pan = angle[0];
my.skill1 += 3*time_step;
c_move(me,vector(3*time_step,0,0),NULL,GLIDE);
ent_animate(me,"walk",my.skill1,ANM_CYCLE);
wait(1);
}
}