U need it in c-script ? If not this one from aum could help
Code:
action guard()
{

while(1) {

vec_set(my.skill2,my.x);

path_spline(me,my.x,my.skill1);
my.skill1 += 3*time_step;


vec_diff(my.skill5,my.x,my.skill2);
vec_to_angle(my.skill8,my.skill5);

my.pan += clamp(ang(my.skill8-my.pan)*0.25,-5,5)*time_step;
my.anim_index += 5 * time_step;
ent_animate(my,"run",my.anim_index,ANM_CYCLE);
wait(1);
}
}

Did not test just copy and pasted.


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;