// attach path in WED !
action follow_path() {
my.skill1 = 1; //start with first node
path_getnode(my,my.skill1,my.skill2,NULL);
while(1) {
// close to node => get position of next node
my.skill4 = my.z;
if(vec_dist(my.skill2,my.x) < 16) {
my.skill1 = path_nextnode(my, my.skill1, 1);
path_getnode(my,my.skill1,my.skill2,NULL);
}
// turn to next node
vec_diff(my.skill5,my.skill2,my.x);
vec_to_angle(my.pan,my.skill5);
my.tilt = 0;
c_move(me,vector(5*time_step,0,0),nullvector,GLIDE | IGNORE_PASSABLE);
wait(1);
}
}