{
	saved_firsttime [1]

	Init[ (s)
	{
		if(saved_firsttime = 1)
		{
			saved_firsttime = 0;
			SetNationality(0);
			SetInvulnerable(true);

			SetAttackDistance(8,8);
			SetState_Patrol(0);
			SetLineOfSight(1);
			SetWander(0);

			PlayAnimation(7);
			GiveWeapon(43);
		}
	} ]

	PathNodeReached[ (path, node)
	{
		if( Level.debug_spam = 1 )
		{
			switch(path)
			{
				case 0 { name="GotoFlak2"; }
				case 1 { name="FleeFlak2"; }
				case 2 { name="Bunker1_1"; }
				case 3 { name="Bunker1_2"; }
				case 4 { name="Bunker1_2b"; }
				case 5 { name="WestTrenchA"; }
				case 6 { name="WestTrenchB"; }
				case 7 { name="FleeFlak1"; }
				case 8 { name="WestTrenchC"; }
				case 9 { name="GotoFlak3"; }
				case 10 {name="FleeFlak3";}
				case 11 {name="Bunker2_1";}
				case 12 {name="Bunker2_1b";}
				case 13 {name="Bunker2_1c";}
				case 14 {name="GotoMedic";}
				case 15 {name="RevealFlak1";}
			}
			Level.Spew("        path_node:  " # name # ", " # node);
		}

		if( path=0 ){if( node=4 )
		{
			// Path: GotoFlak2
			Charge = Level.GetEntity("Charg_2");
			Charge.ShowEntity(true);
			TurnToEntity( Charge );
			PlayAnimation(27);
			Delay(4,4);
		}}
		if( path=1 ){if( node=2 )
		{
			// Path: FleeFlak2
			TurnToLocation( 10368, 10944 );
			SetCrouching();
			PlayAnimation(10); // aim crouch

			Delay(3,50);
		}}
		if( path=2 ){if( node=4 )
		{
			// Path: Bunker1_1
			PlayAnimation(10);
			TurnToLocation(5324,14630);
		}}
		if( path=3){if( node=2 )
		{
			// Path: Bunker1_2
			PlayAnimation(13);
			TurnToLocation( 4480,15232 );
		}}
		if( path=4 ){if( node=2 )
		{
			// Path: Bunker1_2b
			PlayAnimation(13);
			TurnToLocation(4108,17164);
		}}
		if( path=5 ){if( node=4 )
		{
			// Path: WestTrenchA
			PlayAnimation(13);
			TurnToLocation(2784,21408);
		}}
		if( path=6 ){if( node=8 )
		{
			// Path: WestTrenchB
			PlayAnimation(10);
		}}
		if( path=7 ){if( node=2 )
		{
			// Path: FleeFlak1
			TurnToLocation(14954,6314);
			PlayAnimation(8);
		}}
		if( path=8 ){if( node=2 )
		{
			// Path: WestTrenchC
			PlayAnimation(8);
			TurnToLocation( 6512,30384 );
		}}
		if( path=9 ){if( node=2 )
		{
			// Path: GotoFlak3
			Charge = Level.GetEntity("Charg_3");
			Charge.ShowEntity(true);
			TurnToEntity( Charge );
			PlayAnimation(27);
			Delay(4,7);
		}}
		if( path=10 ){if( node=3 )
		{
			// Path: FleeFlak3
			Level.GoPath("Bunker2_1",0);
		}}
		if( path=11 )
		{
			// Path: Bunker2_1
			if( node=4 )
			{
				gate = Level.GetEntity("fence3");
				gate.ShowEntity(false);
				gate.SetPassable(true);

				Level.GetPlayer().PlaySound(3);
				Level.CreateEffect(55,61,0,5248,37504,-476,128,14,16,16);
			}
			if( node=8 )
			{
				if( Level.saved_GotDocs2 = 0 )
				{
					PlayAnimation(13);
					TurnToLocation( 5939,40704 );
				}
			}
		}
		if( path=12 ){if( node=3 )
		{
			// Path: Bunker2_1b
			if( Level.saved_GotDocs2 = 0 )
			{
				Level.Spew("   ---[ Docs 2 not picked up ]---");
				PlayAnimation(13);
				TurnToLocation( 4518,42911 );
			}
		}}
		if( path=14 )
		{
			if( node=2 )
			{
				SetState_Idle();
			}
			if( node=3 )
			{
				// Medic:  "I can't... oh God!"
				Level.GetPlayer().PlaySound(21,100,true);
				Level.GetEntity("medic").PlayAnimation(1,1,0); // point over there

				Enemy34 = Level.GetEntity("enemy34");
				if( not Enemy34.IsDead() )
				{
					Enemy34.SetCrouching();
					Enemy34.PlayAnimation(1);
					Enemy34.WalkTo(14374,40934,70,3);
				}

				bubba = Level.GetEntity("bubba3");
				if( not bubba.IsDead() )
				{
					bubba.SetCrouching();
					bubba.PlayAnimation(1);
					bubba.WalkTo(14665,40082,74,3);
				}

				return;
			}
			if( node=5 )
			{
				// Path: GotoMedic
				Medic = Level.GetEntity("medic");

				SetState_Idle();
				SetCrouching();
				TurnToEntity(Medic);
				PlayAnimation(8);
				Delay(2,20);

				return;
			}
		}
	}]

	DelayReached[ (s)
	{
		if ( s = 1)
		{
			Level.GetPlayer().SetFrozen( false );

			SetRunning();
			PlayAnimation(0);
			WalkTo( 23296, 2816 ); // Destination 0

			Squad3 = Level.GetEntity("squad3");
			Squad3.PlayAnimation(1);
			Squad3.SetCrouching();
			Squad3.WalkTo( 23808, 3328, 1, 2);

			Squad1 = Level.GetEntity("squad1");
			Squad1.PlayAnimation(1);
			Squad1.SetCrouching();
			Squad1.WalkTo( 21888, 2958, 1, 2 );

			Delay(4, 3);
		}
		if ( s = 2 )
		{
			Level.Log("JeffTest10");
			Level.saved_gunsDestroyed = toInt(Level.saved_gunsDestroyed + 1);
			Level.Log("JeffTest11");
			Level.GoPath("FleeFlak1",0);
			Level.Log("JeffTest12");
			PlaySound(20, 100, true);
			Level.Log("JeffTest13");
			Delay(3,11);
			Level.Log("JeffTest14");
		}
		if( s = 3 )
		{
			Level.GetPlayer().PlaySound(18,100,true);
		}
		if ( s = 4 )
		{
			Level.saved_gunsDestroyed = toInt(Level.saved_gunsDestroyed + 1);

			Level.GoPath("FleeFlak2",0);
			PlaySound(20,100,true);
			Delay(3, 12); // destroy flak2
		}
		if( s = 7 )
		{
			Level.Spew("---[ Flak3 destroyed ]---");
			Level.GoPath("FleeFlak3",0);
			PlaySound(20,100,true);
			Delay(3, 13); // destroy flak 3
		}
		if ( s = 11 )
		{
			Flak_1 = Level.GetEntity("Flak_1");
			Flak_1.DoFireExplosionEffect();
			Flak_1.SetModel(48);
			Charg_1 = Level.GetEntity("Charg_1");

			xPos = Flak_1.GetPositionX();
			yPos = Flak_1.GetPositionY();
			Level.GetPlayer().ShakeHere( xPos, yPos );
			Level.GetPlayer().DamageHere( xPos, yPos, 3000, 8 );

			Charg_1.ShowEntity(false);
			PlaySound(3);
		}
		if ( s = 12 )
		{
			Flak_2 = Level.GetEntity("Flak_2");
			Flak_2.DoFireExplosionEffect();
			Flak_2.SetModel(48);
			Charg_2 = Level.GetEntity("Charg_2");

			xPos = Flak_2.GetPositionX();
			yPos = Flak_2.GetPositionY();
			Level.GetPlayer().ShakeHere( xPos, yPos );
			Level.GetPlayer().DamageHere( xPos, yPos, 3000, 8 );

			Charg_2.ShowEntity(false);
			PlaySound(3);
		}
		if ( s = 13 )
		{
			Flak_3 = Level.GetEntity("Flak_3");
			Flak_3.DoFireExplosionEffect();
			Flak_3.SetModel(48);
			Flak_3.PlaySound(3);

			xPos = Flak_3.GetPositionX();
			yPos = Flak_3.GetPositionY();
			Level.GetPlayer().ShakeHere( xPos, yPos );
			Level.GetPlayer().DamageHere( xPos, yPos, 3000, 8 );

			Charg_3 = Level.GetEntity("Charg_3");
			Level.ObjectiveComplete(3);
			Level.SetObjectiveActive(2,false);
			Level.SetObjectiveActive(4,true);
			Charg_3.ShowEntity(false);

		}
		if (s = 20)
		{
			Med = Level.GetEntity("medic");
			Hurt = Level.GetEntity("john");
			TurnToEntity( Hurt );
			Med.Delay(5,12);
		}
		if (s = 30)
		{
			SetProne();
			PlayAnimation(1,-1,0);
			PlayWeaponAnimation(1,-1,0);

			WalkTo(15000,43550,1001,2);
		}

		if(s=50)
		{
			gate = Level.GetEntity("fence1");
			gate.ShowEntity(false);
			gate.SetPassable(true);

			Level.GetPlayer().PlaySound(3);
			Level.CreateEffect(55,61,0,8340,12416,-476,128,14,16,16);

			// Stropa Fix: Wait 4 seconds before entering bunker 1
			Level.GoPath("Bunker1_1", 0);
			PauseFollowingPath();
			Delay(9,51);
		}
		if(s=51)
		{
			// Stropa Fix:  Bunker1_1 Delay
			ResumeFollowingPath();
		}
		if(s=60)
		{
			// Stropa Fix:  WestTrenchA Delay
			ResumeFollowingPath();
		}

		if(s=100)
		{
			Level.LoadLevel("S_AMM1_Level");
		}

		if(s=1000)
		{
			EnableNDY( false );

			SetCrouching();
			PlayAnimation(1);
			WalkTo(15567,42624,999,1);
		}
		if(s=1001)
		{
			SetModel(63);
			GiveWeapon(43);

			dude = Level.GetEntity("tod");
			dude.ShowEntity(true);

			TurnTo( Level.GetPlayer() );
			PlayAnimation(7,1,6);
			Level.GetPlayer().PlaySound(17);
			Delay(5,1002);

			Level.SetObjectiveActive(0,false);
			Level.SetObjectiveActive(1,false);
			Level.SetObjectiveActive(2,false);
			Level.SetObjectiveActive(3,false);
			Level.SetObjectiveActive(4,true);
			Level.ObjectiveComplete(5);
			Level.SetObjectiveActive(5,false);
			Level.SetObjectiveActive(6,true);
			Level.SetObjectiveActive(7,false);
			Level.SetObjectiveActive(8,false);
			Level.SetObjectiveActive(9,false);

			for i=162 to 179
			{
				Level.SetCellBlocking(66,i,0);
			}

			dude = Level.GetEntity("bubba3");
			if( not dude.IsDead() )
			{
				dude.TurnTo(self);
				dude.Attack(self);
				Level.GetEntity("fake1").Kill();
				Level.GetEntity("fake2").Kill();
			}
		}
		if(s=1002)
		{
			PlayAnimation(8);
		}

	} ]

	ReachedDestination[ (s)
	{
		if( s = 0 )
		{
			StopWalkTo();
			PlayAnimation(8); // crouch idle
		}
		if( s = 1 )
		{
			Level.Log("JeffTest1");
			Charge = Level.GetEntity("Charg_1");
			Level.Log("JeffTest2");
			Charge.ShowEntity(true);
			Level.Log("JeffTest3");
			TurnToEntity( Charge );
			Level.Log("JeffTest4");
			PlayAnimation(27);
			Level.Log("JeffTest5");
			Delay(4,2);
			Level.Log("JeffTest6");
		}
		if( s = 5 )
		{
			TurnToLocation(21593,4608);
			PlayAnimation(10);
			Level.CheckObjectives();
		}

		if(s = 303)
		{
			TurnToLocation(3434,15253); // face documents
			WalkTo(4480,14464,304,1);
		}
		if(s = 304)
		{
			TurnToLocation(4736,17261);
			PlayAnimation(13);
		}

		if(s=999)
		{
			PlayAnimation(2,1,1);
			SetPosition(15567,42250,270);
			WalkTo(15552,40793,1000,1);
		}
		if(s=1000)
		{
			Hurt = Level.GetEntity("john");
			Hurt.ShowEntity(false);

			SetModel(70);
			SetPosition(15574,40691);
			SetRotationTurn(0);

			PlayAnimation(0,127,1);

			GiveWeapon(72);
			PlayWeaponAnimation(0,127,1);

			Delay(11,30);
			return;
		}
		if(s=1001)
		{
			TurnToLocation(15000,45000);
			PlayAnimation(2,127,0);
			PlayWeaponAnimation(2,127,0);
			Delay(6,1001);
		}
	} ]
}