define MOVEMENT_SPEED, skill1;
action enemy_follow_path
{
var dist = 0; // entity walk speed
var LastPos[3];
var Dir[3];
path_set(my, "way1"); // Change way1 to the name of your path set in WED
while(1)
{
path_spline(me,my.x,dist); // spline curve for smooth walking
dist += 12*time_step; // change this to change the walk speed
c_move(me,vector(1*time_step,0,0),nullvector,IGNORE_YOU); // this is for collision but you donīt need
vec_diff(Dir,my.x,LastPos);
vec_to_angle(my.pan,Dir);
vec_set(LastPos,my.x);*/
ent_animate(my, "run", my.MOVEMENT_SPEED, ANM_CYCLE);
my.MOVEMENT_SPEED += 10 * time_step;
wait(1);
}
}