{

	saved_yet [0]

	Init[(s)
	{
		if (saved_yet = 0)
		{
			saved_yet = 1;
			
			SetNationality(3);
	
			GiveWeapon(62);
			PlayAnimation(7);
	
			SetAttackDistance(15,15);
			SetState_Patrol(0);
			SetLineOfSight(1);
	
			SetRunning();
			SetWander(0);
			
			SetDead(false,30);
			
			if ((GetID()="com1") or (GetID()="com3") or (GetID()="com5") or (GetID()="com70") or (GetID()="com80"))
			{
				SetCrouching(1);
				PlayAnimation(8);
			}
		}
	}]
	
	DelayReached[(dy)
	{
		if (dy = 5)
		{
			GoWalking("compath4",5,22224,5776);
		}
		
		if (dy = 10)
		{
			GoWalking("compath5",5,22224,5776);
		}
		if (dy = 15)
		{
			GoWalking("compath1",10,6800,16496);
		}
		
		if (dy = 20)
		{
			PlayAnimation(7);
			SetRunning();
			FollowPath("mak5");
			FollowPathCallback(4,"SplitPath");
		}
		
		if (dy = 25)
		{
			FollowPath("mak6");
			FollowPathCallback(6,"EarlyCover",2);
		}
		
		if (dy = 45)
		{
			GetPlayer().SetFrozen(false);	
		}
		
		if (dy = 50)
		{
			FollowPath("comsnipe");
			FollowPathCallback(2,"FakeDeath");
		}
		
		if (dy = 70)
		{
			GoWalking("compath70",10,15089,20323);
		}
		
		if (dy = 80)
		{
			GoWalking("compath80",5,15089,20323);
			Level.Log("TESTING, HES GONNA DIE... PART 1");
			Delay(20,90);
		}
		
		if (dy = 90)
		{
			Level.Log("TESTING, HES GONNA DIE... PART 2");
			Kill();
			PlaySound(7);
		}
	}]
	
	SplitPath[()
	{
		SetState_Idle();
		StopFollowingPath();
		
		if (GetID()="com2")
		{
			GoWalking("compath2",10,4192,23744);
		}
		if (GetID()="com3")
		{
			FollowPath("compath2");
			FollowPathCallback(2,"EarlyCover",1);
		}
	}]
	
	EarlyCover[(num)
	{
		StopFollowingPath();
		
		if (num = 1)
		{
			EndNode(5,4192,23744);
		}
		
		if (num = 2)
		{
			EndNode(5,4528,25056);
		}
	}]

	
	GoWalking [ (path,type,xpos,ypos)
	{
		SetAttackDistance(10,10);
		SetState_Patrol(0);
		SetLineOfSight(1);
		
		SetRunning();
		PlayAnimation(0);
		
		FollowPath(path);
		FollowPathCallback(127,"EndNode",type,xpos,ypos);
	}]

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

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

	}]

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

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

	FakeDeath[()
	{
		SetState_Idle();
		Level.GetPlayer().PlaySound(29);
		Kill();
	}]
}