------------------------------------------------------------------------------------------------------------------------------------------
InsertAlienMechHusk = function()
----------------------------------------------------------------------------------------------------------------------------------------
	RandomAlienMechHuskLocation = Utils.Random({ RandomLandWaypoint00.Location, RandomLandWaypoint01.Location, RandomLandWaypoint02.Location, RandomLandWaypoint03.Location, RandomLandWaypoint04.Location, RandomLandWaypoint05.Location, RandomLandWaypoint06.Location, RandomLandWaypoint07.Location, RandomLandWaypoint08.Location, RandomLandWaypoint09.Location, RandomLandWaypoint10.Location, RandomLandWaypoint11.Location })
----------------------------------------------------------------------------------------------------------------------------------------
	RandomAlienMechHusk = Actor.Create("tripod.husk", true, { Location = RandomAlienMechHuskLocation, Owner = creeps })
----------------------------------------------------------------------------------------------------------------------------------------
	CameraAlienMachine0 = Actor.Create("camera.mission", true, { Owner = multi0, Location = RandomAlienMechHusk.Location + CVec.New(0, 1) })
	CameraAlienMachine1 = Actor.Create("camera.mission", true, { Owner = multi1, Location = RandomAlienMechHusk.Location + CVec.New(0, 1) })
	CameraAlienMachine2 = Actor.Create("camera.mission", true, { Owner = multi2, Location = RandomAlienMechHusk.Location + CVec.New(0, 1) })
	CameraAlienMachine3 = Actor.Create("camera.mission", true, { Owner = multi3, Location = RandomAlienMechHusk.Location + CVec.New(0, 1) })
----------------------------------------------------------------------------------------------------------------------------------------
	InspectAlienMachine0 = multi0.AddSecondaryObjective("Inspect the Destroyed Alien-Machine Husk\n (with mechanic)!")
	InspectAlienMachine1 = multi1.AddSecondaryObjective("Inspect the Destroyed Alien-Machine Husk\n (with mechanic)!")
	InspectAlienMachine2 = multi2.AddSecondaryObjective("Inspect the Destroyed Alien-Machine Husk\n (with mechanic)!")
	InspectAlienMachine3 = multi3.AddSecondaryObjective("Inspect the Destroyed Alien-Machine Husk\n (with mechanic)!")
----------------------------------------------------------------------------------------------------------------------------------------
	Camera.Position = Map.CenterOfCell(RandomAlienMechHuskLocation)
----------------------------------------------------------------------------------------------------------------------------------------
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(10.10, 12.12)), function()
		if multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
			if FieldGeneral0.IsInWorld and FieldGeneral1.IsInWorld and FieldGeneral2.IsInWorld and FieldGeneral3.IsInWorld then Utils.Do(FieldGeneral0 or FieldGeneral1 or FieldGeneral2 or FieldGeneral3, function(a) Camera.Position = a.CenterPosition end) end
		elseif not multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
			if FieldGeneralLiveState0 then Utils.Do(FieldGeneral0, function(a) Camera.Position = a.CenterPosition end) end
		elseif multi0.IsBot and not multi1.IsBot and multi2.IsBot and multi3.IsBot then
			if FieldGeneralLiveState1 then Utils.Do(FieldGeneral1, function(a) Camera.Position = a.CenterPosition end) end
		elseif multi0.IsBot and multi1.IsBot and not multi2.IsBot and multi3.IsBot then
			if FieldGeneralLiveState2 then Utils.Do(FieldGeneral2, function(a) Camera.Position = a.CenterPosition end) end
		elseif multi0.IsBot and multi1.IsBot and multi2.IsBot and not multi3.IsBot then
			if FieldGeneralLiveState3 then Utils.Do(FieldGeneral3, function(a) Camera.Position = a.CenterPosition end) end
		else
		end
	end)
----------------------------------------------------------------------------------------------------------------------------------------
	Trigger.OnCapture(RandomAlienMechHusk, function(self, captor)
		if captor.Owner == multi0 and captor.Type == "mech" then
			if (self.Type == "tripod.husk") then
				Media.PlaySoundNotification(multi0, "CameraSound")
			end
			return
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
				multi0.MarkCompletedObjective(InspectAlienMachine0)
				multi1.MarkFailedObjective(InspectAlienMachine1)
				multi2.MarkFailedObjective(InspectAlienMachine2)
				multi3.MarkFailedObjective(InspectAlienMachine3)
			end)
----------------------------------------------------------------------------------------------------------------------------------------
		elseif captor.Owner == multi1 and captor.Type == "mech" then
			if (self.Type == "tripod.husk") then
				Media.PlaySoundNotification(multi1, "CameraSound")
			end
			return
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
				multi1.MarkCompletedObjective(InspectAlienMachine1)
				multi0.MarkFailedObjective(InspectAlienMachine0)
				multi2.MarkFailedObjective(InspectAlienMachine2)
				multi3.MarkFailedObjective(InspectAlienMachine3)
			end)
----------------------------------------------------------------------------------------------------------------------------------------
		elseif captor.Owner == multi2 and captor.Type == "mech" then
			if (self.Type == "tripod.husk") then
				Media.PlaySoundNotification(multi2, "CameraSound")
			end
			return
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
				multi2.MarkCompletedObjective(InspectAlienMachine2)
				multi0.MarkFailedObjective(InspectAlienMachine0)
				multi1.MarkFailedObjective(InspectAlienMachine1)
				multi3.MarkFailedObjective(InspectAlienMachine3)
			end)
----------------------------------------------------------------------------------------------------------------------------------------
		elseif captor.Owner == multi3 and captor.Type == "mech" then
			if (self.Type == "tripod.husk") then
				Media.PlaySoundNotification(multi3, "CameraSound")
			end
			return
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
				multi3.MarkCompletedObjective(InspectAlienMachine3)
				multi0.MarkFailedObjective(InspectAlienMachine0)
				multi1.MarkFailedObjective(InspectAlienMachine1)
				multi2.MarkFailedObjective(InspectAlienMachine2)
			end)
		end
		Trigger.AfterDelay(DateTime.Seconds(2.222), function()
----------------------------------------------------------------------------------------------------------------------------------------
			AlienMech = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(m) return m.Type == "tripod" end)
			Utils.Do(AlienMech, function(am)
				RandomAlienMechHusk00 = Actor.Create("tripod.husk", true, { Location = am.Location + CVec.New(Utils.Random({ Utils.RandomInteger(2, 4), Utils.RandomInteger(-3, -1) }), Utils.Random({ Utils.RandomInteger(2, 4), Utils.RandomInteger(-3, -1) })), Owner = am.Owner })
				RandomAlienMechHusk01 = Actor.Create("tripod.husk", true, { Location = am.Location + CVec.New(Utils.Random({ Utils.RandomInteger(2, 4), Utils.RandomInteger(-3, -1) }), Utils.Random({ Utils.RandomInteger(2, 4), Utils.RandomInteger(-3, -1) })), Owner = am.Owner })
				RandomAlienMechHusk02 = Actor.Create("tripod.husk", true, { Location = am.Location + CVec.New(Utils.Random({ Utils.RandomInteger(2, 4), Utils.RandomInteger(-3, -1) }), Utils.Random({ Utils.RandomInteger(2, 4), Utils.RandomInteger(-3, -1) })), Owner = am.Owner })
				Beacon.New(am.Owner, am.CenterPosition, Utils.RandomInteger(444, 666), Utils.Random({ true, false }))
				Media.PlaySoundNotification(am.Owner, "TripodHornSound")
			end)
		end)
----------------------------------------------------------------------------------------------------------------------------------------
	end)
end

