{
	saved_FirstTime[0]

	Init[(s)
	{
		if(saved_FirstTime=0)
		{
			saved_FirstTime=1;
			SetNationality(1);
	
			GiveWeapon(56);
			PlayAnimation(7);
	
			SetAttackDistance(15,15);
			SetState_Patrol(0);
			SetLineOfSight(1);
	
			SetRunning();
			SetWander(0);
	
			if ((GetID()="flaker1") or (GetID()="flaker2"))
			{
	
				DropWeaponOnDeath(false);
			}
	
			if (GetID()="city4")
			{
//				SetState_Idle();
				PlayAnimation(13);
			}
			if ((GetID()="fod01") or (GetID()="fod02"))
			{
				PlayAnimation(13);
//				SetState_Idle();
			}
		}
	}]

	Respawn[ (where)
	{
		SetDead( false );
		SetRunning();
		PlayAnimation(1);
		SetHealth(512);

		switch( where )
		{
			case 0
			{
				GiveWeapon(56);

				SetAttackDistance(10,10);
				SetState_Patrol(0);
				SetLineOfSight(1);

				SetPosition(28480,21344,128);
				FollowPath("flakpath1");
				FollowPathCallback(127,"GunnerEnd",1);
			}

			case 1
			{
				GiveWeapon(56);

				SetAttackDistance(10,10);
				SetState_Patrol(0);
				SetLineOfSight(1);

				SetPosition(24528,21088,128);
				FollowPath("flakpath2");
				FollowPathCallback(127,"GunnerEnd",2);
			}

			case 2
			{
				GiveWeapon(56);

				SetAttackDistance(7,7);
				SetState_Patrol(0);
				SetLineOfSight(1);

				SetPosition(14784,32294,128);
				FollowPath("church1");
			}
			
			case 3
			{
				GiveWeapon(56);

				SetAttackDistance(15,15);
				SetState_Patrol(0);
				SetLineOfSight(1);

				SetPosition(26480,28352,128);
				FollowPath("final3");
			}
		}
	}]

	DelayReached[(delay)
	{
		if (delay = 10)
		{
			if (Level.saved_FlakMan1 < 4)
			{
				Level.saved_FlakMan1 = (Level.saved_FlakMan1 +1);
				Level.GetEntity("flaker1").Respawn(0);
			}
		}

		if (delay = 20)
		{
			if (Level.saved_FlakMan2 < 4)
			{
				Level.saved_FlakMan2 = (Level.saved_FlakMan2 +1);
				Level.GetEntity("flaker2").Respawn(1);
			}
		}

		if (delay = 30)
		{
			if (Level.saved_ChurchRush < 3)
			{
				Level.GetEntity("church2").Respawn(2);
			}
		}
		
		if (delay = 70)
		{
			if (Level.saved_Rusher3 < 1)
			{
				Level.saved_Rusher3 = (Level.saved_Rusher3 +1);
				Level.GetEntity("fod01").Respawn(3);
			}
		}
	}]

	GunnerEnd[(type)
	{

		PlayAnimation(10);

		SetAttackDistance(15,15);
		SetState_Patrol(0);
		SetLineOfSight(1);

		SetCrouching();
		SetWander(0);

		if (type = 1)
		{
			TurnToLocation(24089,25907);
		}

		if (type = 2)
		{
			TurnToLocation(23244,24486);
		}
		
		if (type = 3)
		{
			TurnToLocation(20992,24647);
		}
	}]
	
	GoActive[()
	{
			
			SetAttackDistance(15,15);
			SetState_Patrol(0);
			SetLineOfSight(1);
	
			SetRunning();
			SetWander(0);	
	}]
	
	GoAttack[()
	{
			SetAttackDistance(8,8);
			SetState_Patrol(0);
			SetLineOfSight(1);
		
			FollowPath("final3");
			FollowPathCallback(127,"GoActive",2);
	}]

}