action state_wait ()
{
c_scan ( my.x,my.pan, vector ( 360,0,1000 ), SCAN_ENTS | IGNORE_ME );
if (event_type ==EVENT_SCAN) my.state = 2;
}
action state_attack ()
{
c_move( me,vector( player.x,player.y,0 ), nullvector,GLIDE );
}
action enemy_act ()
{
enemy = my;
my.state = 1;
while( my )
{
if (my.state == 2)
{
state_attack ();
}
else
{
state_wait ();
}
wait (1);
}
}