"TRAINING"
{
	INT my_unit_recno 
	my_unit_recno = FUNC("get_character_recno") 

	// This unit just search for unit for a short range and do idle most of the time

	INT random_number 
	INT enemy_recno
	INT	target_recno 


	// no enemy is near , move back to his formation, if his leader is far away
	enemy_recno = FUNC("search_for_unit" , my_unit_recno, "O" , 1000, 0, 0, 0) 

	if( enemy_recno  )
	{
		FUNC("set_unit_mode" , my_unit_recno, "ATTACK")
	}

	if( FUNC("is_attack_mode" , my_unit_recno) )
	{
		if( enemy_recno )
		{
			ACTION("give_order" , my_unit_recno, "TURN" , 3 , 0 , FUNC("get_rotation" , my_unit_recno, enemy_recno) , 0 , 0 , 0, 2500)
			SCRIPT("script\unit\human_light_inf_attack_share.txt")
			exit
		}

		exit
	}

	if( FUNC("is_idle_mode", my_unit_recno) )
	{
		// search for unit again, move to the enemy unit if is near
		enemy_recno = FUNC("search_for_unit" , my_unit_recno, "O" , 1600, 1, 0, 0) 

		if( enemy_recno > 0 ) 
		{
			ACTION("give_order" , my_unit_recno, "APPROACH_ENEMY" , 1 , 0 , enemy_recno , 60 , 60 , 0, 30000)
			exit
		}

		FUNC("set_unit_mode" , my_unit_recno, "IDLE" )
	}

}
