{

	saved_yet [0]

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

			GiveWeapon(60);
			PlayAnimation(7);

			SetAttackDistance(15,15);
			SetState_Patrol(0);
			SetLineOfSight(1);

			SetWalkToDist(10);
			SetWander(0);
		}
	}]

	DelayReached[(dy)
	{

		if (dy = 5)
		{
			Level.GetPlayer().PlaySound(151);
			Delay(4,10);
		}

		if (dy = 10)
		{
			Level.GetPlayer().SetFrozen(false);
			NextPath(1);
		}

		if (dy = 15)
		{
			Level.GetPlayer().PlaySound(152);
			Delay(6,20);
		}

		if (dy = 20)
		{
			Level.AdvanceObjectives(1);
			GetPlayer().SetFrozen(false);
			NextPath(5);

			Comrade1 = Level.GetEntity("com1");
			Comrade1.Delay(0,15);

			Comrade2 = Level.GetEntity("com2");
			Comrade2.Delay(2,20);

			Comrade3 = Level.GetEntity("com3");
			Comrade3.Delay(4,20);
		}

		if (dy = 25)
		{
			Level.Log("WE ARE PINNED DOWN, TAKE OUT THAT SNIPER!");
			Level.GetPlayer().PlaySound(174);
			Delay(3,30);
		}

		if (dy = 30)
		{
			Level.AdvanceObjectives(1);
			Sniper = Level.GetEntity("sniper");
			Sniper.Delay(1,5);
		}

		if (dy = 35)
		{
			Level.Log("GREAT SHOT IVANOVICH, LET'S GO!");
//			PlaySound "great shot ivanovich! lets go!"
			Delay(3,40);
		}

		if (dy = 40)
		{
			GetPlayer().SetFrozen(false);
			Level.AdvanceObjectives(1);
			NextPath(7);
		}

		if (dy = 45)
		{
			Level.GetPlayer().PlaySound(156);
			Delay(4,50);
		}

		if (dy = 50)
		{
			GetPlayer().SetFrozen(false);
			Level.AdvanceObjectives(1);

			Comrade70 = Level.GetEntity("com70");
			Comrade70.Delay(3,70);

			Comrade80 = Level.GetEntity("com80");
			Comrade80.Delay(1,80);

			NextPath(9);
		}

		if (dy = 60)
		{
			Level.Log("IVANOVICH, YOU'VE DONE IT!!! YOU'VE MADE RUSSIA PROUD!");
			Level.GetPlayer().PlaySound(154);
			Delay(4,65);
		}

		if (dy = 65)
		{
			Level.Outtro();
		}

		if (dy = 70)
		{
			Level.AdvanceObjectives(1);
		}
	}]

	NextPath[(num)
	{
		PlayAnimation(7);
		SetRunning();

		if (num = 1)
		{
			FollowPath("mak1");
		}

		if (num = 2)
		{
			FollowPath("mak2");
			FollowPathCallback(0,"SetState_Idle");
			FollowPathCallback(127,"EndNode",5,21968,9968);
		}

		if (num = 3)
		{
			FollowPath("mak3");
			FollowPathCallback(4,"SetState_Idle");
			FollowPathCallback(127,"AmIHere");
			FollowPathCallback(127,"EndNode",5,8896,6672);
		}

		if (num = 4)
		{
			FollowPath("mak4");
			FollowPathCallback(127,"EndNode",5,7744,13792);
			FollowPathCallback(127,"Arrived");
		}

		if (num = 5)
		{
			FollowPath("mak5");
			FollowPathCallback(5,"SetState_Idle");
			FollowPathCallback(127,"EndNode",5,4368,22976);
		}

		if (num = 6)
		{
			FollowPath("mak6");
			FollowPathCallback(127,"EndNode",5,7152,27648);
			FollowPathCallback(127,"Arrived2");
		}

		if (num = 7)
		{
			FollowPath("mak13");
			FollowPathCallback(127,"EndNode",10,12176,27408);
		}

		if (num = 8)
		{
			FollowPath("mak7");
			FollowPathCallback(127,"EndNode",5,14193,28188);
			FollowPathCallback(127,"Arrived3");
		}

		if (num = 9)
		{
			FollowPath("mak8");
			FollowPathCallback(127,"EndNode",10,13738,19072);
		}

		if (num = 10)
		{
			Level.Log("HE HAS ARRIVED");
			FollowPath("mak00");
			FollowPathCallback(127,"EndNode",5,7744,13792);
			FollowPathCallback(127,"Arrived");
		}
	}]

	AmIHere[()
	{
		Level.Log("saved_MakarovHere = +1");
		Level.saved_MakarovHere = (Level.saved_MakarovHere +1);
	}]

	Arrived[()
	{
		Level.saved_GroupComplete = (Level.saved_GroupComplete +1);
		Level.CheckGroup();
	}]

	Arrived2[()
	{
		Level.saved_SniperArea = (Level.saved_SniperArea +1);
		Level.CheckSniper();
	}]

	Arrived3[()
	{
		Level.saved_HallArea = (Level.saved_HallArea +1);
		Level.CheckHall();
	}]

	EndNode[(type,xpos,ypos)
	{
		if (type = 5)
		{
			PlayAnimation(11);
			SetCrouching();
			GoPatrol();
			TurnToLocation(xpos,ypos);
		}

		if (type = 10)
		{
			PlayAnimation(7);
			SetRunning();
			GoPatrol();
			TurnToLocation(xpos,ypos);
		}

	}]

	GoPatrol[()
	{
		SetAttackDistance(15,15);
		SetState_Patrol(0);
		SetLineOfSight(1);

		SetWalkToDist(10);
		SetWander(0);
	}]
}