I am not exactly sure what you mean, but maybe try vec_dist...

Code:

action enemy {
my.push=1;
my.polygon=on;
while(ready_to_play == 1)
{
if (vec_dist(my.x, player.x) <= 330) {
c_move(me,nullvector,vector(-2,0,0), glide);
}
wait(1);
}
}



Not tested, though.

Thanks,
Adoado


Visit our development blog: http://yellloh.com