wow.. I got something right! That must be a sign tongue
I tried that. Doesn't work confused .
Code:
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);
	}
}


To be honest, I'm not even sure if the action is attached to the entity properly...

Last edited by Panda_Dude; 04/10/11 21:05.