Thx all for the help, the code work, but I still have some problem
Quote:
action enemy_follow_path
{
var dist = 0; // entity walk speed
var LastPos[3];
var Dir[3];
while (player == null) {wait (1);}
my.z = player.z;
my.event = destroy_them;
my.passable = off;
my.skill40 = 1;
my.skill10 = 1;
path_set(my, "path_002"); //he name of your path set in WED

while(my.skill10 == 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);
my.MOVEMENT_SPEED += 10 * time_step;

wait(1);
}
ent_remove(me);
}

Quote:

//part of the destroy_them function
if (my.skill40 == 1) // a ship was hit?
{
my.skill10 = 0;
if (you.skill40 == 99) // if it was player's bullet
{
score_value += 100; // get 100 points for a ship
}
effect(particles_explo2, 30, my.x, nullvector);
}

I've modified the code for make it be destroyed by the bullets of the player, but the enemy simple doesn't get demage, skill10 still remain 1 cause it continue to move