function player_scanning()
{
while (1)
{
c_scan(my.x, my.pan, vector(360, 0, 500), SCAN_ENTS | SCAN_LIMIT | IGNORE_ME);
if (you)
{
ent_create ("slider.pcx", vector (you.x, you.y, you.z + 60), entity_marker);
}
wait (1);
}
}
action my_enemy() // attach this action to your enemies
{
player_scanning();
var idle_percentage = 0;
var run_percentage = 0;
var death_percentage = 0;
var content_right[3]; // tracks the content in front of the player
var content_left[3]; // tracks the content in front of the player
var temp[3];
set(my,POLYGON);// use accurate collision detection
my.health = 100;
my.emask |= ENABLE_IMPACT; // the enemy is sensitive to impact with player's bullets
my.event = got_shot; // and runs this function when it is hit
my.status = idle; // that's the same thing with my.skill1 = 1; (really!)
while (my.status != dead) // this loop will run for as long as my.skill1 isn't equal to 3
{