{
	saved_ShotCnt [0]
	saved_firstTime [1]

	GoPath[ (path, mode)
	{
		if( mode=0 )
		{
			SetRunning();
			PlayAnimation(0);
		}
		if( mode=1 )
		{
			SetWalking();
			PlayAnimation(1);
		}
		FollowPath(path);
		FollowPathCallback( 127, "GoPatrol");
	}]

	GoPatrol[ ()
	{
		gun = Random(1,2);
		if( gun=1 ){
			GiveWeapon(60);
		}else{
			GiveWeapon(62);
		}

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

	}]

	Init[ ()
	{
		if(saved_firstTime = 1)
		{
			saved_firstTime = 0;
			SetNationality(3);

			SetCrouching();
			GiveWeapon(62);

			SetInvulnerable( true );
			EnableNDY( false );

			PlayAnimation(10); // aim crouch
			Delay( Random(1,4),5 );
		}
	}]

	DelayReached[ (dy)
	{
		if( dy=5 )
		{
			if( Level.saved_RunField = 0 )
			{
				face = 16666 + Random(-2048,2048);
				SetRotationTurn( face );
				Delay( 1,6 );
			}
		}

		if( dy=6 )
		{
			if( Level.saved_AtPhase2 = 1)
			{
				DoShot = Random(0,3);
				if( DoShot=1 )
				{
					YouSure = Random(0,1);
					if( YouSure = 1 )
					{
						Level.GetPlayer().PlaySound(29);
					}
				}

				saved_ShotCnt = (saved_ShotCnt + 1);
				if( saved_ShotCnt=5 )
				{
					saved_ShotCnt=0;
					Delay(1,5);
				}
				else
				{
					Delay(1,6);
				}
			}
			else
			{
				Delay( Random(1,4), 5 );
			}
		}

		if( dy=10 )
		{
			Kill();
		}

		if( dy=100 )
		{
			//Level.LoadLevel("S_RUM3_Level");
			Level.LoadLevel("S_BOM3_Riechstag");
		}
	}]
}