{
	saved_Spawned [0]
	saved_firstTime [1]

	DoLeanCover[( direction )
	{
		if( not self.IsDead() )
		{
			StopFollowingPath();
			TurnTo( Level.GetPlayer() );

			if( direction="left" )
			{
				SetWalking();
				PlayAnimation(15);
				SetStandShootAnim(15);
				Attack( Level.GetPlayer() );
			}
			if( direction="right" )
			{
				SetWalking();
				PlayAnimation(14);
				SetStandShootAnim(14);
				Attack( Level.GetPlayer() );
			}
			if( direction="stand" )
			{
				SetWalking();
				PlayAnimation(13);
				Attack( Level.GetPlayer() );
			}
			if( direction="crouch")
			{
				SetCrouching();
				PlayAnimation(10);
				Attack( Level.GetPlayer() );
			}
			if( direction="standPatrol" )
			{
				SetWalking();
				SetState_Patrol(1);
				SetAttackDistance( 10, 8 );
				SetLineOfSight( 2, 120 );
			}
		}
	}]

	Respawn[()
	{
		if (Level.saved_Wave1 = 1 )
		{
			if ( saved_Spawned < 1 )
			{
				saved_Spawned = saved_Spawned + 1;

				gun = Random(1,3);
				switch(gun)
				{
					case 1 { GiveWeapon(56); } // MP44
					case 2 { GiveWeapon(53); } // Kar98k
					case 3 { GiveWeapon(55); } // MP40
				}

				SetDead(false);
				ShowEntity(true);
				SetHealth(256);
				PlayAnimation(7);

				if( GetID() = "wave1a"){ SetPosition(21744,25472,255); TakeCover("WP1a",0,"stand"); }
				if( GetID() = "wave1b"){ SetPosition(21144,25472,255); TakeCover("WP1b",0,"crouch"); }
				if( GetID() = "wave1c"){ SetPosition(23936,18304,1407); TakeCover("WP1c",0,"stand"); }
			}
		}
	}]

	TakeCover[ (path, speed, coverMode)
	{
		if( not self.IsDead() )
		{
			if( speed=0 )
			{
				SetRunning();
				PlayAnimation(0);
			}
			else
			{
				SetWalking();
				PlayAnimation(1);
			}

			FollowPath( path );
			switch(coverMode)
			{
				case "left" { FollowPathCallback(127, "DoLeanCover", "left"); }
				case "right" { FollowPathCallback(127, "DoLeanCover", "right"); }
				case "stand" { FollowPathCallback(127, "DoLeanCover", "stand"); }
				case "crouch" { FollowPathCallback(127, "DoLeanCover", "crouch"); }
				case "standPatrol" { FollowPathCallback(127, "DoLeanCover", "standPatrol"); }
			}
		}
	}]

	Init[ ()
	{
		if(saved_firstTime = 1)
		{
			saved_firstTime = 0;
			SetNationality(1);
			gun = Random(1,3);
			switch(gun)
			{
				case 1 { GiveWeapon(56); } // MP44
				case 2 { GiveWeapon(53); } // Kar98k
				case 3 { GiveWeapon(55); } // MP40
			}

			SetRunning();
			PlayAnimation(7);
		}
	}]

	DelayReached[ (dy)
	{
		if( dy=1 )
		{
			Respawn();
		}
	}]

	OnDecay[ ()
	{
		Delay( Random(1,3),1);
	}]
}