{
	saved_FirstTime[0]
	saved_also [0]

	NumObjectives [5]
	saved_CurObjective [0]

	saved_OnGun01 [0]
	saved_WarningZone [0]
	saved_EnterChurch [0]

	saved_FlakTeam [0]
	saved_FlakMan1 [0]
	saved_FlakMan2 [0]

	saved_Rusher1 [0]
	saved_Rusher2 [0]
	saved_Rusher3 [0]

	saved_ChurchPath [0]

	saved_FlakArea [0]

	saved_ChurchRush [0]

	saved_CityZone1 [0]
	saved_SniperDead [0]

	OnLevelLoad[()
	{
		PlayAmbient(83);
		
		if (saved_also = 0)
		{
			saved_also = 1;
			Moody = GetEntity("moody");
			Moody.PlayAnimation(7);
			Moody.Delay(1,5);

			SetMessage("Foy, Belgium",75,35);
			SetMessage2(536,75,50);
			SetMessage3(506,75,65);
			
		}
	}]

	Init[ (s)
	{
		if(saved_FirstTime=0)
		{
			saved_FirstTime = 1;

			AddObjective( 141, 9203, 26112);
			SetObjectiveActive(0, true);

			AddObjective( 142, 9365, 7850);
			SetObjectiveActive(1, false);

			AddObjective( 143, 9203, 26112);
			SetObjectiveActive(2, false);

			AddObjective( 144, 7795, 26496);
			SetObjectiveActive(3, false);

			AddObjective( 145, 26419, 22784);
			SetObjectiveActive(4, false);

			Self=GetPlayer();
			Self.SetNationality(0);
			Self.GiveWeapon(43, 5);
			Self.GiveWeapon(41, 5);
			Self.GiveWeapon(40, 5);
			Self.GiveWeapon(42, 8);
			Self.SetInvulnerable(false);

			GetPlayer().SetFrozen(true);

			AutoSave();
		}
	}]

	AdvanceObjectives[ (hideLast)
	{
		if( saved_CurObjective < NumObjectives )
		{
			NextObj = (saved_CurObjective+1);
			DropObj = (saved_CurObjective-2);

			ObjectiveComplete( saved_CurObjective );

			if( NextObj < NumObjectives )
			{
				if( hideLast = 1 )
				{
					SetObjectiveActive( saved_CurObjective, false );
				}

				SetObjectiveActive( NextObj, true );

				if( saved_CurObjective > 1 )
				{
					SetObjectiveActive( NextObj, true );
					if( hideLast = 0 )
					{
						SetObjectiveActive( DropObj, false );
					}
				}
			}
			saved_CurObjective = NextObj;
		}
	}]

	EnterZone[ (zone)
	{

		if (zone = "gunzone01")
		{
			if (saved_OnGun01 = 0)
			{
				AdvanceObjectives(1);
				saved_OnGun01 = 1;
				GunDude1 = GetEntity("gun01");
				GunDude1.Delay(0,1);
				
				GetPlayer().PlaySound(144);
			}
		}

		if (zone = "churchzone")
		{
			if (saved_EnterChurch = 0)
			{
				saved_EnterChurch = 1;
				
				if (saved_SniperDead = 0)
				{
					GetPlayer().PlaySound(145);
					AdvanceObjectives(0);
				}
				
			}
		}

		if (zone = "city1")
		{

			if (saved_CityZone1 = 0)
			{
				saved_CityZone1 = 1;
				Moody2 = GetEntity("moody");
				Moody2.NextPath(2);
			}
		}

		if (zone = "city2")
		{
			if (saved_CityZone1 = 1)
			{
				if (saved_OnGun01 = 2)
				{
					SetCellBlocking(19,58,false);
					SetCellBlocking(19,59,false);
					SetCellBlocking(19,60,false);
					
					saved_CityZone1 = 2;
					Moody3 = GetEntity("moody");
					Moody3.NextPath(3);
				}
				
				if (saved_OnGun01 < 2)
				{
					SetMessage(507,75,35);
					SetMessage2(508,75,50);
				}
			}
		}

		if (zone = "city3")
		{
			if (saved_CityZone1 = 2)
			{
				saved_CityZone1 = 3;
				Moody4 = GetEntity("moody");
				Moody4.NextPath(4);
				NewGuy01 = GetEntity("new01");
				NewGuy01.GoActive();
				NewGuy02 = GetEntity("new02");
				NewGuy02.GoActive();
			}
		}

		if (zone = "city4")
		{
			if (saved_CityZone1 = 3)
			{
				saved_CityZone1 = 4;
				NewFod01 = GetEntity("fod01");
				NewFod01.GoAttack();
				NewFod02 = GetEntity("fod02");
				NewFod02.GoActive();
			}
		}

		if (zone = "church1")
		{
			if (saved_ChurchPath = 0)
			{
				saved_ChurchPath = 1;
				Moody6 = GetEntity("moody");
				Moody6.NextPath(6);
			}
		}

		if (zone = "flakzone")
		{
			if (saved_FlakArea = 0)
			{
				saved_FlakArea = 1;
				GetPlayer().PlaySound(140);
				
				Moody = GetEntity("moody");
				Moody.ClearQueuedPaths();
				Moody.StopFollowingPath();
				Moody.SetState_Idle();
				Moody.SetPosition(25563,27867);
				Moody.NextPath(7);
			}
		}
		
		if (zone = "sniperzone")
		{
			if (saved_SniperDead < 1)
			{
					GetPlayer().PlaySound(29);
					GetPlayer().Kill();
			}
		}
	}]

	ActorKilled[(who)
	{
		if (who = "gun01")
		{
			if (saved_OnGun01 < 2)
			{
				GetEntity("gun01").Delay(2,2);
			}
			else
			{
				GetEntity("gun01").SetState_Idle();
				AdvanceObjectives(0);
			}
		}

		if (who = "sniper")
		{
			saved_SniperDead = 1;
			saved_EnterChurch = 1;
//			AdvanceObjectives(0);
			SetObjectiveActive(2, false);
			ObjectiveComplete(3);
			SetObjectiveActive(4, true);

			Moody5 = GetEntity("moody");
			Moody5.NextPath(5);
		}

//		if (who = "flakcap")
//		{
//			saved_FlakTeam = (saved_FlakTeam +1);
//			CheckFlakTeam();
//		}

		if (who = "flaker1")
		{
			FlakDude1 = GetEntity("flaker1");
			saved_FlakTeam = (saved_FlakTeam +1);
			CheckFlakTeam();
			FlakDude1.Delay(2,10);
		}

		if (who = "flaker2")
		{
			FlakDude2 = GetEntity("flaker2");
			saved_FlakTeam = (saved_FlakTeam +1);
			CheckFlakTeam();
			FlakDude2.Delay(2,20);
		}

		if (who = "church2")
		{
			ChurchSpawn = GetEntity("church2");
			saved_ChurchRush = (saved_ChurchRush +1);
			ChurchSpawn.Delay(2,30);
		}

		if (who = "rush01")
		{
			Rush01 = GetEntity("rush01");
			Rush01.Delay(2,50);
		}

		if (who = "rush02")
		{
			Rush02 = GetEntity("rush02");
			Rush02.Delay(2,60);
		}

		if (who = "fod01")
		{
			Rush03 = GetEntity("fod01");
			Rush03.Delay(1,70);
		}
	}]

	CheckFlakTeam[()
	{
		if( saved_FlakTeam = 10)
		{
			Moody50 = GetEntity("moody");
			Moody50.Delay(2,20);
		}
	}]
}