{
	saved_yet [0]

	Init[ ()
	{
		if( saved_yet = 0 )
		{
			saved_yet = 1;

			SetInvulnerable( true );
			SetNationality(2);

			if( (Level.debug_detachTruck = 0) and (Level.debug_skipToPlanes = 0) )
			{
				SetState_TruckDrive();
			}

			SetBaseRotation(0,0,180);
			SetMinRotation(-70,-45,-70);
			SetMaxRotation(70,45,70);

			if( Level.debug_skipToPlanes = 0 )
			{
				// Attach Sargent Waters
				Sgt = Level.GetEntity("sarge");
				Sgt.AttachTo( self, 5 );
				Sgt.SetBaseRotation(0,0,180);
				Sgt.SetCrouching();
				Sgt.PlayAnimation(8); // idle crouch
				Sgt.GoPatrol();
			}

			// Attach a respawning healthpack
			Hpack = Level.CreateEntity(189,0,0,0);
			Hpack.AttachTo( self, 7 );
			Hpack.SetBaseRotation(0,0,90);
			Level.saved_NumPacks = 1;
		}
	}]

	DelayReached[ (dy)
	{
		if( dy=10 )
		{
			Level.LoadLevel("S_BRM4_V2Rockets");
		}
	}]

	DriveToBridge[ ()
	{
		FollowPath( "rDrive01a", 0 );
		FollowPathCallback( 127, "GetFollowed" );
	}]

	GetFollowed[ ()
	{
		FollowPath( "rDrive01b", 0 );
		FollowPathCallback( 1, "EncouragePlayer", "gTruck1" );
		FollowPathCallback( 6, "EncouragePlayer", "gTruck1" );
		FollowPathCallback( 127, "CrossBridge" );
	}]

	CrossBridge[ ()
	{
		FollowPath( "rDrive01c", 0 );
		FollowPathCallback( 127, "BridgeSequence" );
	}]

	BridgeSequence[ ()
	{
		if( Level.debug_skipBridge = 0 )
		{
			Level.Spew("--> BridgeSequence()");

			StopSound(126);
			Level.saved_IsPlaying_TruckDrive = 0;

			Level.saved_AtBridge = 1;
			Level.GetPlayer().PlaySound(127);
			Level.GetPlayer().DeleteInventoryItemOfType( 190 );

			Sgt = Level.GetEntity("sarge");
			Sgt.SetState_Idle();
			Sgt.SetBaseRotation(0,0,-30);
			Sgt.PlayAnimation(8);
			Sgt.Delay(8,10);

			panz = Level.GetEntity("tPans");
			if( isObject( panz ) )
			{
				Level.Spew("        Object Exists");
				if( not isObject( panz.GetOwner() ) )
				{
					Level.Spew("        Object is not being weilded");
					DestroyObject( Level.GetEntity("tPans") );
				}
			}
			else
			{
				Level.Spew("        Object DOES NOT Exist");
			}

			Level.Spew("        Creating Rifle");
			YourRifle = Level.CreateEntity(62,0,0,0);
			Level.Spew("          - Adding 5 clips");
			YourRifle.SetNumClips( 5 );
			Level.Spew("          - Attaching to truckbed");
			YourRifle.AttachTo( self, 6 );
			Level.Spew("   <-- BridgeSequence()");
		}
		else
		{
			Level.GetEntity("sarge").BackInTruck();
		}
	}]

	EnterTunnelOne[ ()
	{
		Level.Spew("--> EnterTunnelOne()");
		FollowPath( "rDrive02a", 0 );
		FollowPathCallback( 127, "MotoChaseOne" );
		Level.Spew("   <-- EnterTunnelOne()");
	}]

	MotoChaseOne[ ()
	{
		Level.Spew("--> MotoChaseOne()");
		FollowPath( "rDrive02b", 0 );
		FollowPathCallback( 1, "EncouragePlayer", "gMoto1" );
		FollowPathCallback( 8, "EncouragePlayer", "gMoto1" );
		FollowPathCallback( 127, "TruckChaseTwo" );
		Level.Spew("   <-- MotoChaseOnce()");
	}]

	TruckChaseTwo[ ()
	{
		Level.Spew("--> TruckChaseTwo()");
		FollowPath( "rDrive03a", 0 );
		FollowPathCallback( 127, "TruckChaseTwoB" );
		Level.Spew("   <-- TruckChaseTwo()");
		return;
	}]
	TruckChaseTwoB[ ()
	{
		Level.Spew("--> TruckChaseTwoB()");
		FollowPath( "rDrive03b", 0 );
		FollowPathCallback( 1, "EncouragePlayer", "gTruck2" );
		FollowPathCallback( 7, "EncouragePlayer", "gTruck2" );
		FollowPathCallback( 127, "MotoChaseTwo" );
		Level.Spew("   <-- TruckChaseTwo()");
		return;
	}]

	MotoChaseTwo[ ()
	{
		Level.Spew("--> MotoChaseTwo()");
		FollowPath( "rDrive04a", 0 );
		FollowPathCallback( 1, "EncouragePlayer", "gMoto2" );
		FollowPathCallback( 9, "EncouragePlayer", "gMoto2" );
		FollowPathCallback( 127, "MotoChaseTwoB" );
		Level.Spew("   <-- MotoChaseTwo()");
		return;
	}]

	MotoChaseTwoB[ ()
	{
		Level.Spew("--> MotoChaseTwoB()");
		FollowPath( "rDrive04b", 0 );
		FollowPathCallback( 127, "DriveToAirport" );
		Level.Spew("   <-- MotoChaseTwoB()");
		return;
	}]


	DriveToAirport[ ()
	{
		Level.Spew("--> DriveToAirport()");

		FollowPath( "rDrive05", 0 );
		FollowPathCallback(127, "DriveToAirportB");
		Level.Spew("   <-- DriveToAirport()");
		return;
	}]
	DriveToAirportB[ ()
	{
		Level.Spew("--> DriveToAirportB()");
		FollowPath("rDrive06");
		FollowPathCallback(127, "DriveToAirportC");
		Level.Spew("   <-- DriveToAirportB()");
		return;
	}]
	DriveToAirportC[()
	{
		Level.Spew("--> DriveToAirportC()");
		PutInReverse( true );
		FollowPath("rDrive07");
		FollowPathCallback(127, "StartBombers");
		Level.Spew("   <-- DriveToAirportC()");
		return;
	}]

	EncouragePlayer[ ( target )
	{
		Level.Spew("--> EncouragePlayer()");
		targetObj = Level.GetEntity( target );
		if( not targetObj.IsDead() )
		{
			Sgt = Level.GetEntity("sarge");
			Sgt.SetState_Idle();
			Sgt.SetBaseRotation(0,0,-30);
			Sgt.PlayAnimation(8);
			Sgt.Delay( 2, 30);

			panz = Level.GetEntity("tPans");
			if( isObject(panz) )
			{
				if( isObject( panz.GetOwner() ) )
				{
					Level.Spew("   You have the Panz all ready!  FIRE IT");
					Level.GetPlayer().PlaySound(128); // Fire it, Damit!
				}
				else
				{
					Level.Spew("  I've given you a Panz you haven't yet picked up!");
					Level.GetPlayer().PlaySound(129); // Here you go!
				}
			}
			else
			{
				Level.Spew("   You need a Panz.  I'll give you one.");
				Level.GetPlayer().PlaySound(129); // Here you go!
				GivePlayerPans();
			}
		}
		Level.Spew("<-- EncouragePlayer()");
	}]

	GivePlayerPans[ ()
	{
		YourPans = Level.CreateEntity(190,0,0,0);
		YourPans.AttachTo( self, 6 );
	}]

	StartBombers[ ()
	{
		Level.GetPlayer().UnAttach(16,174);
		Level.GetPlayer().SetFrozen( false );

		Sgt = Level.GetEntity("sarge");
		Sgt.UnAttach(19,176);
		Sgt.SetWalking();
		Sgt.GoPatrol();

		truck = Level.GetEntity("rTruck1");
		truck.StopSound( 126 );
		Level.saved_IsPlaying_TruckDrive = 0;
		truck.SetModel(32);
		truck.SetState_Idle();
	}]

	GameOver[ ()
	{
		Level.Victory();
		Delay(8,10);

	}]
}

