ACTION sentry_gun {

if(my.clipped != on && vec_dist(my.x,player.x) <= 200) //200 or whatever move to player distance

{
my.x == player.x+1;
my.y == player.y+1;
my.z == player.z+1;
wait(1);
}
while{
if(my.clipped != on && vec_dist(my.x,player.x) <= 50)//shoot at 50
{

player.health -= 1*10 //10 damage, you can adjust
wait(1000); //wait 1000m/s u ntil damage is give again
}
}
}

Last edited by Leaf; 07/02/07 08:27.