action moveontrack_01()
{
var walk_percentage;
var walking_speed = 0.3;
VECTOR last_pos[3];
VECTOR direction[3];
var distance = 0;
var dist_to_node;
var current_node = 1;
set(my,SHADOW|PASSABLE);
path_set(me, "path_000");
while(1)
{
ent_animate(my, "run", walk_percentage, ANM_CYCLE); // play the "walk" animation
walk_percentage += 6 * time_step; // "3" controls the animation speed
path_spline(me, my.x, distance);
distance += walking_speed ;
vec_diff(direction, my.x, last_pos);
vec_to_angle(my.pan, direction);
vec_set(last_pos, my.x);
wait(1);
}
}