function event_scan_attack1_damage()
{
if (event_type == EVENT_SCAN)
{
my.health -= 10;
}
}
action enemy_with_pointer()
{
var death_percentage;
enemy = my;
c_updatehull(my, 1);
my.emask |= ENABLE_SCAN;
my.event = event_scan_attack1_damage;
while(1)
{
if (my.health <= 0) // Check life
{
ent_animate(my, "death", death_percentage, 0);
death_percentage += 3 * time_step; // Animationspeed
}
wait (1);
}
}
--------> c_scan(guard1.x, guard1.pan, vector(45, 60, 50), IGNORE_ME);