InsertTechicalSqad0 = function()
	Utils.Do(FieldGeneral0, function(s) 
		PTW0 = Map.ActorsInCircle(s.CenterPosition, WDist.FromCells(15), function(s) return (s.Type == "mpspawn.0" or s.Type == "mpspawn.1" or s.Type == "mpspawn.2" or s.Type == "mpspawn.3") end)
		Utils.Do(PTW0, function(MPs)
			if MPs.Type == "mpspawn.0" then
				PrisonerTechnicalsWaypoint0 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint0.Location + CVec.New(Utils.RandomInteger(15, 17), Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.1" then
				PrisonerTechnicalsWaypoint0 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint1.Location + CVec.New(Utils.RandomInteger(-17, -15), -Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.2" then
				PrisonerTechnicalsWaypoint0 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint2.Location + CVec.New(Utils.RandomInteger(15, 17), Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.3" then
				PrisonerTechnicalsWaypoint0 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint3.Location + CVec.New(Utils.RandomInteger(-17, -15), Utils.RandomInteger(-3, 3)) })
			end
		end)
	end)
	Trigger.AfterDelay(0.0001, function()
		Trigger.AfterDelay(0.0001, function()
			PartisanPrisonerTechnicals0 = Reinforcements.Reinforce(Utils.Random({ creeps, creeps, creeps }), PartisanUnitTypes, { PrisonerTechnicalsWaypoint0.Location + CVec.New(Utils.Random({ -2, -1 }), Utils.Random({ -2, -1 })) }, Utils.RandomInteger(1, 2))
			Utils.Do(PartisanPrisonerTechnicals0, function(ppt)
				ppt.Stance = "Defend"
				ppt.GrantUpgrade("autocontrol")
				Trigger.OnIdle(ppt, function(ppt)
					ppt.Patrol({PrisonerTechnicalsWaypoint0.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint0.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint0.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint0.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint0.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint0.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint0.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 }))}, true, Utils.RandomInteger(44, 88))
				end)
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2.33, 3.22)), function()
				Utils.Do(Utils.Take(AK47PartisanUpgradePersonCount, PartisanPrisonerTechnicals0), function(p)
					p.GrantUpgrade("ak47upg")
				end)
			end)
			Trigger.OnAllKilled(PartisanPrisonerTechnicals0, function()
				ArmorersdetachmentQuestText0 = "Armorer detachment team, rescued!"
				if CameraLockedTechicalSqad0.IsInWorld and not CameraLockedTechicalSqadState0 then
					CameraLockedTechicalSqad0.Destroy()
				end
				CameraLockedTechicalSqadState0 = true
				Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.44, 1)), function()
					Media.PlaySpeechNotification(multi0, "CivilianHappySound" .. Utils.RandomInteger(1, 2))
				end)
				Trigger.AfterDelay(DateTime.Seconds(1.111), function()
					if not multi0.IsObjectiveCompleted(ArmorersdetachmentQuest0) and not multi0.IsObjectiveFailed(ArmorersdetachmentQuest0) then
						multi0.MarkCompletedObjective(ArmorersdetachmentQuest0) 
						if not TechnicalsA0.IsDead and not StartVehicleA0.IsDead then
							Utils.Do(StartVehicleA0, function(vehicle) 
								TechnicalsA0.EnterTransport(vehicle)
								TechnicalsA0.GrantUpgrade("unkillable")
								TechnicalsA0.RevokeUpgrade("missionmarker.disabled")
								TechnicalsA0.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsB0.IsDead and not StartVehicleB0.IsDead then
							Utils.Do(StartVehicleB0, function(vehicle)
								TechnicalsB0.RevokeUpgrade("free.objective")
								TechnicalsB0.EnterTransport(vehicle)
								TechnicalsB0.GrantUpgrade("unkillable")
								TechnicalsB0.RevokeUpgrade("missionmarker.disabled")
								TechnicalsB0.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsC0.IsDead and not StartVehicleC0.IsDead then 
							Utils.Do(StartVehicleC0, function(vehicle)
								TechnicalsC0.EnterTransport(vehicle)
								TechnicalsC0.GrantUpgrade("unkillable")
								TechnicalsC0.RevokeUpgrade("missionmarker.disabled")
								TechnicalsC0.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsD0.IsDead and not StartVehicleD0.IsDead then
							Utils.Do(StartVehicleD0, function(vehicle)
								TechnicalsD0.EnterTransport(vehicle)
								TechnicalsD0.GrantUpgrade("unkillable")
								TechnicalsD0.RevokeUpgrade("missionmarker.disabled")
								TechnicalsD0.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsE0.IsDead and not StartVehicleE0.IsDead then
							Utils.Do(StartVehicleE0, function(vehicle) 
								TechnicalsE0.EnterTransport(vehicle) 
								TechnicalsE0.GrantUpgrade("unkillable")
								TechnicalsE0.RevokeUpgrade("missionmarker.disabled")
								TechnicalsE0.GrantUpgrade("missionmarker.enabled")
							end)
						end
						Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.33, 1)), function()
							Media.PlaySpeechNotification(multi0, "Target" .. Utils.Random({ "Freed", "Rescued" }))
						end)
					end
				end)
			end)
		end)		
		ArmorersdetachmentQuestText0 = "You must be rescue the armorer detachment team!"
		TechicalTranHusk0 = Actor.Create("tran.husk" .. tostring(Utils.RandomInteger(1, 2)), true, { Location = PrisonerTechnicalsWaypoint0.Location, Owner = multi0 })
		CameraTechicalTranHusk0 = Actor.Create("camera.small", true, { Owner = multi0, Location = TechicalTranHusk0.Location + CVec.New(Utils.RandomInteger(1, 2), Utils.RandomInteger(-2, -1)) })
		Trigger.AfterDelay(0.0001, function()
			TechnicalsB0.GrantUpgrade("free.objective")
			CameraLockedTechicalSqad0 = Actor.Create("camera.prisoner", true, { Owner = creeps, Location = PrisonerTechnicalsWaypoint0.Location })
			Trigger.OnRemovedFromWorld(CameraLockedTechicalSqad0, function()
				Trigger.AfterDelay(DateTime.Seconds(1), function()
					if TechicalTranHusk0.IsInWorld then
						TechicalTranHusk0.Kill()
					end
				end)
			end)
		end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(6, 8)), function() 
			ArmorersdetachmentQuest0 = multi0.AddSecondaryObjective(ArmorersdetachmentQuestText0) 
			Media.PlaySpeechNotification(multi0, "WarningThreeMinutesRemaining")
			Beacon.New(multi0, PrisonerTechnicalsWaypoint0.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
			Trigger.AfterDelay(DateTime.Minutes(3), function()
				if CameraLockedTechicalSqad0.IsInWorld then 
					Media.PlaySpeechNotification(multi0, "WarningTwoMinutesRemaining")
					Beacon.New(multi0, PrisonerTechnicalsWaypoint0.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
				end
				Trigger.AfterDelay(DateTime.Minutes(2), function()
					if CameraLockedTechicalSqad0.IsInWorld then 
						Media.PlaySpeechNotification(multi0, "WarningOneMinuteRemaining")
						Beacon.New(multi0, PrisonerTechnicalsWaypoint0.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
					end
					Trigger.AfterDelay(DateTime.Minutes(1), function()
						if CameraLockedTechicalSqad0.IsInWorld then 
							Media.PlaySpeechNotification(multi0, "TimerStopped")
							Beacon.New(multi0, PrisonerTechnicalsWaypoint0.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
							CameraLockedTechicalSqad0.Destroy()
						end
					end)
				end)
			end)
		end)
		TechnicalsHeliHuskSlipped0 = Utils.RandomInteger(-1, 1)
		TechnicalsA0 = Actor.Create("pilot", true, { Owner = multi0, Location = PrisonerTechnicalsWaypoint0.Location + CVec.New(TechnicalsHeliHuskSlipped0, -1), SubCell = 1 })
		TechnicalsB0 = Actor.Create("pilot", true, { Owner = multi0, Location = PrisonerTechnicalsWaypoint0.Location + CVec.New(TechnicalsHeliHuskSlipped0, -1), SubCell = 2 })
		TechnicalsC0 = Actor.Create("pilot", true, { Owner = multi0, Location = PrisonerTechnicalsWaypoint0.Location + CVec.New(TechnicalsHeliHuskSlipped0, -1), SubCell = 3 })
		TechnicalsD0 = Actor.Create("pilot", true, { Owner = multi0, Location = PrisonerTechnicalsWaypoint0.Location + CVec.New(TechnicalsHeliHuskSlipped0, -1), SubCell = 4 })
		TechnicalsE0 = Actor.Create("pilot", true, { Owner = multi0, Location = PrisonerTechnicalsWaypoint0.Location + CVec.New(TechnicalsHeliHuskSlipped0, -1), SubCell = 5 })
		Technicals0 = { TechnicalsA0, TechnicalsB0, TechnicalsC0, TechnicalsD0, TechnicalsE0 }
		Utils.Do({ TechnicalsA0, TechnicalsB0, TechnicalsC0, TechnicalsD0, TechnicalsE0 }, function(t)
			Trigger.AfterDelay(DateTime.Seconds(1), function()
				t.GrantUpgrade("missionmarker.disabled")
			end)
			t.Stance = "HoldFire"
			t.GrantUpgrade("nocontrol")
		end)
		Trigger.AfterDelay(DateTime.Seconds(1), function()
			PrisonedTechnicalsSpeechTicks0()
		end)
		Trigger.OnAllRemovedFromWorld(Technicals0, function()
			Trigger.AfterDelay(DateTime.Seconds(2), function()
				if CameraLockedTechicalSqad0.IsInWorld then
					CameraLockedTechicalSqad0.Destroy()
				end
			end)
		end)
		Trigger.OnAllKilled(Technicals0, function()
			Trigger.AfterDelay(DateTime.Seconds(1), function()
				multi0.MarkFailedObjective(ArmorersdetachmentQuest0)
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(99, 111)), function()
				InsertDetachmentTransportHelo0("tran", multi0, Map.ClosestEdgeCell(StartingWaypoint0.Location), StartingWaypoint0, "pilot")
			end)
		end)
	end)
end
InsertTechicalSqad1 = function()
	Utils.Do(FieldGeneral1, function(s) 
		PTW1 = Map.ActorsInCircle(s.CenterPosition, WDist.FromCells(15), function(s) return (s.Type == "mpspawn.0" or s.Type == "mpspawn.1" or s.Type == "mpspawn.2" or s.Type == "mpspawn.3") end)
		Utils.Do(PTW1, function(MPs)
			if MPs.Type == "mpspawn.0" then
				PrisonerTechnicalsWaypoint1 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint0.Location + CVec.New(Utils.RandomInteger(15, 17), Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.1" then
				PrisonerTechnicalsWaypoint1 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint1.Location + CVec.New(Utils.RandomInteger(-17, -15), -Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.2" then
				PrisonerTechnicalsWaypoint1 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint2.Location + CVec.New(Utils.RandomInteger(15, 17), Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.3" then
				PrisonerTechnicalsWaypoint1 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint3.Location + CVec.New(Utils.RandomInteger(-17, -15), Utils.RandomInteger(-3, 3)) })
			end
		end)
	end)
	Trigger.AfterDelay(0.0001, function()
		Trigger.AfterDelay(0.0001, function()
			PartisanPrisonerTechnicals1 = Reinforcements.Reinforce(Utils.Random({ creeps, creeps, creeps }), PartisanUnitTypes, { PrisonerTechnicalsWaypoint1.Location + CVec.New(Utils.Random({ -2, -1 }), Utils.Random({ -2, -1 })) }, Utils.RandomInteger(1, 2))
			Utils.Do(PartisanPrisonerTechnicals1, function(ppt) 
				ppt.Stance = "Defend"
				ppt.GrantUpgrade("autocontrol")
				Trigger.OnIdle(ppt, function(ppt)
					ppt.Patrol({PrisonerTechnicalsWaypoint1.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint1.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint1.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint1.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint1.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint1.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint1.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 }))}, true, Utils.RandomInteger(44, 88))
				end)
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2.33, 3.22)), function()
				Utils.Do(Utils.Take(AK47PartisanUpgradePersonCount, PartisanPrisonerTechnicals1), function(p)
					p.GrantUpgrade("ak47upg")
				end)
			end)
			Trigger.OnAllKilled(PartisanPrisonerTechnicals1, function()
				ArmorersdetachmentQuestText1 = "Armorer detachment team, rescued!"
				if CameraLockedTechicalSqad1.IsInWorld and not CameraLockedTechicalSqadState1 then 
					CameraLockedTechicalSqad1.Destroy()
				end
				CameraLockedTechicalSqadState1 = true
				Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.44, 1)), function() 
					Media.PlaySpeechNotification(multi1, "CivilianHappySound" .. Utils.RandomInteger(1, 2))
				end)
				Trigger.AfterDelay(DateTime.Seconds(1.111), function()
					if not multi1.IsObjectiveCompleted(ArmorersdetachmentQuest1) and not multi1.IsObjectiveFailed(ArmorersdetachmentQuest1) then
						multi1.MarkCompletedObjective(ArmorersdetachmentQuest1) 
						if not TechnicalsA1.IsDead and not StartVehicleA1.IsDead then
							Utils.Do(StartVehicleA1, function(vehicle)
								TechnicalsA1.EnterTransport(vehicle)
								TechnicalsA1.GrantUpgrade("unkillable")
								TechnicalsA1.RevokeUpgrade("missionmarker.disabled")
								TechnicalsA1.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsB1.IsDead and not StartVehicleB1.IsDead then
							Utils.Do(StartVehicleB1, function(vehicle)
								TechnicalsB1.RevokeUpgrade("free.objective")
								TechnicalsB1.EnterTransport(vehicle) 
								TechnicalsB1.GrantUpgrade("unkillable")
								TechnicalsB1.RevokeUpgrade("missionmarker.disabled")
								TechnicalsB1.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsC1.IsDead and not StartVehicleC1.IsDead then
							Utils.Do(StartVehicleC1, function(vehicle) 
								TechnicalsC1.EnterTransport(vehicle) 
								TechnicalsC1.GrantUpgrade("unkillable")
								TechnicalsC1.RevokeUpgrade("missionmarker.disabled")
								TechnicalsC1.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsD1.IsDead and not StartVehicleD1.IsDead then
							Utils.Do(StartVehicleD1, function(vehicle)
								TechnicalsD1.EnterTransport(vehicle) 
								TechnicalsD1.GrantUpgrade("unkillable")
								TechnicalsD1.RevokeUpgrade("missionmarker.disabled")
								TechnicalsD1.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsE1.IsDead and not StartVehicleE1.IsDead then
							Utils.Do(StartVehicleE1, function(vehicle)
								TechnicalsE1.EnterTransport(vehicle)
								TechnicalsE1.GrantUpgrade("unkillable")
								TechnicalsE1.RevokeUpgrade("missionmarker.disabled")
								TechnicalsE1.GrantUpgrade("missionmarker.enabled")
							end)
						end
						Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.33, 1)), function() 
							Media.PlaySpeechNotification(multi1, "Target" .. Utils.Random({ "Freed", "Rescued" }))
						end)
					end
				end)
			end)
		end)
		CameraLockedTechicalSqadState1 = false
		ArmorersdetachmentQuestText1 = "You must be rescue the armorer detachment team!"
		TechicalTranHusk1 = Actor.Create("tran.husk" .. tostring(Utils.RandomInteger(1, 2)), true, { Location = PrisonerTechnicalsWaypoint1.Location, Owner = multi1 })
		CameraTechicalTranHusk1 = Actor.Create("camera.small", true, { Owner = multi1, Location = TechicalTranHusk1.Location + CVec.New(Utils.RandomInteger(1, 2), Utils.RandomInteger(-2, -1)) })
		Trigger.AfterDelay(0.0001, function()
			TechnicalsB1.GrantUpgrade("free.objective")
			CameraLockedTechicalSqad1 = Actor.Create("camera.prisoner", true, { Owner = creeps, Location = PrisonerTechnicalsWaypoint1.Location })
			Trigger.OnRemovedFromWorld(CameraLockedTechicalSqad1, function()
				Trigger.AfterDelay(DateTime.Seconds(1), function()
					if TechicalTranHusk1.IsInWorld then
						TechicalTranHusk1.Kill()
					end
				end)
			end)
		end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(6, 8)), function()
			ArmorersdetachmentQuest1 = multi1.AddSecondaryObjective(ArmorersdetachmentQuestText1)
			Media.PlaySpeechNotification(multi1, "WarningThreeMinutesRemaining")
			Beacon.New(multi1, PrisonerTechnicalsWaypoint1.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
			Trigger.AfterDelay(DateTime.Minutes(3), function()
				if CameraLockedTechicalSqad1.IsInWorld then 
					Media.PlaySpeechNotification(multi1, "WarningTwoMinutesRemaining")
					Beacon.New(multi1, PrisonerTechnicalsWaypoint1.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
				end
				Trigger.AfterDelay(DateTime.Minutes(2), function()
					if CameraLockedTechicalSqad1.IsInWorld then 
						Media.PlaySpeechNotification(multi1, "WarningOneMinuteRemaining")
						Beacon.New(multi1, PrisonerTechnicalsWaypoint1.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
					end
					Trigger.AfterDelay(DateTime.Minutes(1), function()
						if CameraLockedTechicalSqad1.IsInWorld then 
							Media.PlaySpeechNotification(multi1, "TimerStopped")
							Beacon.New(multi1, PrisonerTechnicalsWaypoint1.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
							CameraLockedTechicalSqad1.Destroy()
						end
					end)
				end)
			end)
		end)
		TechnicalsHeliHuskSlipped1 = Utils.RandomInteger(-1, 1)
		TechnicalsA1 = Actor.Create("pilot", true, { Owner = multi1, Location = PrisonerTechnicalsWaypoint1.Location + CVec.New(TechnicalsHeliHuskSlipped1, -1), SubCell = 1 })
		TechnicalsB1 = Actor.Create("pilot", true, { Owner = multi1, Location = PrisonerTechnicalsWaypoint1.Location + CVec.New(TechnicalsHeliHuskSlipped1, -1), SubCell = 2 })
		TechnicalsC1 = Actor.Create("pilot", true, { Owner = multi1, Location = PrisonerTechnicalsWaypoint1.Location + CVec.New(TechnicalsHeliHuskSlipped1, -1), SubCell = 3 })
		TechnicalsD1 = Actor.Create("pilot", true, { Owner = multi1, Location = PrisonerTechnicalsWaypoint1.Location + CVec.New(TechnicalsHeliHuskSlipped1, -1), SubCell = 4 })
		TechnicalsE1 = Actor.Create("pilot", true, { Owner = multi1, Location = PrisonerTechnicalsWaypoint1.Location + CVec.New(TechnicalsHeliHuskSlipped1, -1), SubCell = 5 })
		Technicals1 = { TechnicalsA1, TechnicalsB1, TechnicalsC1, TechnicalsD1, TechnicalsE1 }
		Utils.Do({ TechnicalsA1, TechnicalsB1, TechnicalsC1, TechnicalsD1, TechnicalsE1 }, function(t)
			Trigger.AfterDelay(DateTime.Seconds(1), function()
				t.GrantUpgrade("missionmarker.disabled") 
			end)
			t.Stance = "HoldFire"
			t.GrantUpgrade("nocontrol")
		end)
		Trigger.AfterDelay(DateTime.Seconds(1), function()
			PrisonedTechnicalsSpeechTicks1() 
		end)
		Trigger.OnAllRemovedFromWorld(Technicals1, function()
			Trigger.AfterDelay(DateTime.Seconds(2), function()
				if CameraLockedTechicalSqad1.IsInWorld then
					CameraLockedTechicalSqad1.Destroy()
				end
			end)
		end)
		Trigger.OnAllKilled(Technicals1, function()
			Trigger.AfterDelay(DateTime.Seconds(1), function() 
				multi1.MarkFailedObjective(ArmorersdetachmentQuest1) 
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(99, 111)), function()
				InsertDetachmentTransportHelo1("tran", multi1, Map.ClosestEdgeCell(StartingWaypoint1.Location), StartingWaypoint1, "pilot")
			end)
		end)
	end)
end
InsertTechicalSqad2 = function()
	Utils.Do(FieldGeneral2, function(s) 
		PTW2 = Map.ActorsInCircle(s.CenterPosition, WDist.FromCells(15), function(s) return (s.Type == "mpspawn.0" or s.Type == "mpspawn.1" or s.Type == "mpspawn.2" or s.Type == "mpspawn.3") end)
		Utils.Do(PTW2, function(MPs)
			if MPs.Type == "mpspawn.0" then
				PrisonerTechnicalsWaypoint2 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint0.Location + CVec.New(Utils.RandomInteger(15, 17), Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.1" then
				PrisonerTechnicalsWaypoint2 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint1.Location + CVec.New(Utils.RandomInteger(-17, -15), -Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.2" then
				PrisonerTechnicalsWaypoint2 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint2.Location + CVec.New(Utils.RandomInteger(15, 17), Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.3" then
				PrisonerTechnicalsWaypoint2 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint3.Location + CVec.New(Utils.RandomInteger(-17, -15), Utils.RandomInteger(-3, 3)) })
			end
		end)
	end)
	Trigger.AfterDelay(0.0001, function()
		Trigger.AfterDelay(0.0001, function()
			PartisanPrisonerTechnicals2 = Reinforcements.Reinforce(Utils.Random({ creeps, creeps, creeps }), PartisanUnitTypes, { PrisonerTechnicalsWaypoint2.Location + CVec.New(Utils.Random({ -2, -1 }), Utils.Random({ -2, -1 })) }, Utils.RandomInteger(1, 2))
			Utils.Do(PartisanPrisonerTechnicals2, function(ppt) 
				ppt.Stance = "Defend"
				ppt.GrantUpgrade("autocontrol")
				Trigger.OnIdle(ppt, function(ppt)
					ppt.Patrol({PrisonerTechnicalsWaypoint2.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint2.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint2.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint2.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint2.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint2.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint2.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 }))}, true, Utils.RandomInteger(44, 88))
				end)
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2.33, 3.22)), function()
				Utils.Do(Utils.Take(AK47PartisanUpgradePersonCount, PartisanPrisonerTechnicals2), function(p)
					p.GrantUpgrade("ak47upg")
				end)
			end)
			Trigger.OnAllKilled(PartisanPrisonerTechnicals2, function()
				ArmorersdetachmentQuestText2 = "Armorer detachment team, rescued!"
				if CameraLockedTechicalSqad2.IsInWorld and not CameraLockedTechicalSqadState2 then
					CameraLockedTechicalSqad2.Destroy()
				end
				CameraLockedTechicalSqadState2 = true
				Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.44, 1)), function()
					Media.PlaySpeechNotification(multi2, "CivilianHappySound" .. Utils.RandomInteger(1, 2)) 
				end)
				Trigger.AfterDelay(DateTime.Seconds(1.111), function()
					if not multi2.IsObjectiveCompleted(ArmorersdetachmentQuest2) and not multi2.IsObjectiveFailed(ArmorersdetachmentQuest2) then
						multi2.MarkCompletedObjective(ArmorersdetachmentQuest2) 
						if not TechnicalsA2.IsDead and not StartVehicleA2.IsDead then
							Utils.Do(StartVehicleA2, function(vehicle)
								TechnicalsA2.EnterTransport(vehicle)
								TechnicalsA2.GrantUpgrade("unkillable")
								TechnicalsA2.RevokeUpgrade("missionmarker.disabled")
								TechnicalsA2.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsB2.IsDead and not StartVehicleB2.IsDead then
							Utils.Do(StartVehicleB2, function(vehicle)
								TechnicalsB2.RevokeUpgrade("free.objective")
								TechnicalsB2.EnterTransport(vehicle)
								TechnicalsB2.GrantUpgrade("unkillable")
								TechnicalsB2.RevokeUpgrade("missionmarker.disabled")
								TechnicalsB2.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsC2.IsDead and not StartVehicleC2.IsDead then
							Utils.Do(StartVehicleC2, function(vehicle)
								TechnicalsC2.EnterTransport(vehicle)
								TechnicalsC2.GrantUpgrade("unkillable")
								TechnicalsC2.RevokeUpgrade("missionmarker.disabled")
								TechnicalsC2.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsD2.IsDead and not StartVehicleD2.IsDead then
							Utils.Do(StartVehicleD2, function(vehicle)
								TechnicalsD2.EnterTransport(vehicle)
								TechnicalsD2.GrantUpgrade("unkillable")
								TechnicalsD2.RevokeUpgrade("missionmarker.disabled")
								TechnicalsD2.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsE2.IsDead and not StartVehicleE2.IsDead then
							Utils.Do(StartVehicleE2, function(vehicle)
								TechnicalsE2.EnterTransport(vehicle)
								TechnicalsE2.GrantUpgrade("unkillable")
								TechnicalsE2.RevokeUpgrade("missionmarker.disabled")
								TechnicalsE2.GrantUpgrade("missionmarker.enabled")
							end)
						end
						Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.33, 1)), function()
							Media.PlaySpeechNotification(multi2, "Target" .. Utils.Random({ "Freed", "Rescued" }))
						end)
					end
				end)
			end)
		end)
		CameraLockedTechicalSqadState2 = false
		ArmorersdetachmentQuestText2 = "You must be rescue the armorer detachment team!"
		TechicalTranHusk2 = Actor.Create("tran.husk" .. tostring(Utils.RandomInteger(1, 2)), true, { Location = PrisonerTechnicalsWaypoint2.Location, Owner = multi2 })
		CameraTechicalTranHusk2 = Actor.Create("camera.small", true, { Owner = multi2, Location = TechicalTranHusk2.Location + CVec.New(Utils.RandomInteger(1, 2), Utils.RandomInteger(-2, -1)) })
		Trigger.AfterDelay(0.0001, function()
			TechnicalsB2.GrantUpgrade("free.objective")
			CameraLockedTechicalSqad2 = Actor.Create("camera.prisoner", true, { Owner = creeps, Location = PrisonerTechnicalsWaypoint2.Location })
			Trigger.OnRemovedFromWorld(CameraLockedTechicalSqad2, function()
				Trigger.AfterDelay(DateTime.Seconds(1), function()
					if TechicalTranHusk2.IsInWorld then
						TechicalTranHusk2.Kill()
					end
				end)
			end)
		end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(6, 8)), function()
			ArmorersdetachmentQuest2 = multi2.AddSecondaryObjective(ArmorersdetachmentQuestText2)
			Media.PlaySpeechNotification(multi2, "WarningThreeMinutesRemaining")
			Beacon.New(multi2, PrisonerTechnicalsWaypoint2.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
			Trigger.AfterDelay(DateTime.Minutes(3), function()
				if CameraLockedTechicalSqad2.IsInWorld then 
					Media.PlaySpeechNotification(multi2, "WarningTwoMinutesRemaining")
					Beacon.New(multi2, PrisonerTechnicalsWaypoint2.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
				end
				Trigger.AfterDelay(DateTime.Minutes(2), function()
					if CameraLockedTechicalSqad2.IsInWorld then 
						Media.PlaySpeechNotification(multi2, "WarningOneMinuteRemaining")
						Beacon.New(multi2, PrisonerTechnicalsWaypoint2.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
					end
					Trigger.AfterDelay(DateTime.Minutes(1), function()
						if CameraLockedTechicalSqad2.IsInWorld then 
							Media.PlaySpeechNotification(multi2, "TimerStopped")
							Beacon.New(multi2, PrisonerTechnicalsWaypoint2.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
							CameraLockedTechicalSqad2.Destroy()
						end
					end)
				end)
			end)
		end)
		TechnicalsHeliHuskSlipped2 = Utils.RandomInteger(-1, 1)
		TechnicalsA2 = Actor.Create("pilot", true, { Owner = multi2, Location = PrisonerTechnicalsWaypoint2.Location + CVec.New(TechnicalsHeliHuskSlipped2, -1), SubCell = 1 })
		TechnicalsB2 = Actor.Create("pilot", true, { Owner = multi2, Location = PrisonerTechnicalsWaypoint2.Location + CVec.New(TechnicalsHeliHuskSlipped2, -1), SubCell = 2 })
		TechnicalsC2 = Actor.Create("pilot", true, { Owner = multi2, Location = PrisonerTechnicalsWaypoint2.Location + CVec.New(TechnicalsHeliHuskSlipped2, -1), SubCell = 3 })
		TechnicalsD2 = Actor.Create("pilot", true, { Owner = multi2, Location = PrisonerTechnicalsWaypoint2.Location + CVec.New(TechnicalsHeliHuskSlipped2, -1), SubCell = 4 })
		TechnicalsE2 = Actor.Create("pilot", true, { Owner = multi2, Location = PrisonerTechnicalsWaypoint2.Location + CVec.New(TechnicalsHeliHuskSlipped2, -1), SubCell = 5 })
		Technicals2 = { TechnicalsA2, TechnicalsB2, TechnicalsC2, TechnicalsD2, TechnicalsE2 }
		Utils.Do({ TechnicalsA2, TechnicalsB2, TechnicalsC2, TechnicalsD2, TechnicalsE2 }, function(t)
			Trigger.AfterDelay(DateTime.Seconds(1), function()
				t.GrantUpgrade("missionmarker.disabled") 
			end)
			t.Stance = "HoldFire"
			t.GrantUpgrade("nocontrol")
		end)
		Trigger.AfterDelay(DateTime.Seconds(1), function()
			PrisonedTechnicalsSpeechTicks2() 
		end)
		Trigger.OnAllRemovedFromWorld(Technicals2, function()
			Trigger.AfterDelay(DateTime.Seconds(2), function()
				if CameraLockedTechicalSqad2.IsInWorld then
					CameraLockedTechicalSqad2.Destroy()
				end
			end)
		end)
		Trigger.OnAllKilled(Technicals2, function()
			Trigger.AfterDelay(DateTime.Seconds(1), function()
				multi2.MarkFailedObjective(ArmorersdetachmentQuest2) 
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(99, 111)), function()
				InsertDetachmentTransportHelo2("tran", multi2, Map.ClosestEdgeCell(StartingWaypoint2.Location), StartingWaypoint2, "pilot")
			end)
		end)
	end)
end
InsertTechicalSqad3 = function()
	Utils.Do(FieldGeneral3, function(s) 
		PTW3 = Map.ActorsInCircle(s.CenterPosition, WDist.FromCells(15), function(s) return (s.Type == "mpspawn.0" or s.Type == "mpspawn.1" or s.Type == "mpspawn.2" or s.Type == "mpspawn.3") end)
		Utils.Do(PTW3, function(MPs)
			if MPs.Type == "mpspawn.0" then
				PrisonerTechnicalsWaypoint3 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint0.Location + CVec.New(Utils.RandomInteger(15, 17), Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.1" then
				PrisonerTechnicalsWaypoint3 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint1.Location + CVec.New(Utils.RandomInteger(-17, -15), -Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.2" then
				PrisonerTechnicalsWaypoint3 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint2.Location + CVec.New(Utils.RandomInteger(15, 17), Utils.RandomInteger(-3, 3)) })
			elseif MPs.Type == "mpspawn.3" then
				PrisonerTechnicalsWaypoint3 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = MultiSpawnPoint3.Location + CVec.New(Utils.RandomInteger(-17, -15), Utils.RandomInteger(-3, 3)) })
			end
		end)
	end)
	Trigger.AfterDelay(0.0001, function()
		Trigger.AfterDelay(0.0001, function()
			PartisanPrisonerTechnicals3 = Reinforcements.Reinforce(Utils.Random({ creeps, creeps, creeps }), PartisanUnitTypes, { PrisonerTechnicalsWaypoint3.Location + CVec.New(Utils.Random({ -2, -1 }), Utils.Random({ -2, -1 })) }, Utils.RandomInteger(1, 2))
			Utils.Do(PartisanPrisonerTechnicals3, function(ppt)
				ppt.Stance = "Defend"
				ppt.GrantUpgrade("autocontrol")
				Trigger.OnIdle(ppt, function(ppt)
					ppt.Patrol({PrisonerTechnicalsWaypoint3.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint3.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint3.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint3.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint3.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint3.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 })), PrisonerTechnicalsWaypoint3.Location + CVec.New(Utils.Random({ -3, -2, -1, 1, 2, 3 }), Utils.Random({ -3, -2, -1, 1, 2, 3 }))}, true, Utils.RandomInteger(44, 88))
				end)
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2.33, 3.22)), function()
				Utils.Do(Utils.Take(AK47PartisanUpgradePersonCount, PartisanPrisonerTechnicals3), function(p)
					p.GrantUpgrade("ak47upg")
				end)
			end)
			Trigger.OnAllKilled(PartisanPrisonerTechnicals3, function()
				ArmorersdetachmentQuestText3 = "Armorer detachment team, rescued!"
				if CameraLockedTechicalSqad3.IsInWorld and not CameraLockedTechicalSqadState3 then
					CameraLockedTechicalSqad3.Destroy()
				end
				CameraLockedTechicalSqadState3 = true
				Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.44, 1)), function()
					Media.PlaySpeechNotification(multi3, "CivilianHappySound" .. Utils.RandomInteger(1, 2))
				end)
				Trigger.AfterDelay(DateTime.Seconds(1.111), function()
					if not multi3.IsObjectiveCompleted(ArmorersdetachmentQuest3) and not multi3.IsObjectiveFailed(ArmorersdetachmentQuest3) then
						multi3.MarkCompletedObjective(ArmorersdetachmentQuest3)
						if not TechnicalsA3.IsDead and not StartVehicleA3.IsDead then
							Utils.Do(StartVehicleA3, function(vehicle)
								TechnicalsA3.EnterTransport(vehicle)
								TechnicalsA3.GrantUpgrade("unkillable")
								TechnicalsA3.RevokeUpgrade("missionmarker.disabled")
								TechnicalsA3.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsB3.IsDead and not StartVehicleB3.IsDead then
							Utils.Do(StartVehicleB3, function(vehicle)
								TechnicalsB3.RevokeUpgrade("free.objective")
								TechnicalsB3.EnterTransport(vehicle)
								TechnicalsB3.GrantUpgrade("unkillable")
								TechnicalsB3.RevokeUpgrade("missionmarker.disabled")
								TechnicalsB3.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsC3.IsDead and not StartVehicleC3.IsDead then
							Utils.Do(StartVehicleC3, function(vehicle)
								TechnicalsC3.EnterTransport(vehicle)
								TechnicalsC3.GrantUpgrade("unkillable")
								TechnicalsC3.RevokeUpgrade("missionmarker.disabled")
								TechnicalsC3.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsD3.IsDead and not StartVehicleD3.IsDead then 
							Utils.Do(StartVehicleD3, function(vehicle)
								TechnicalsD3.EnterTransport(vehicle)
								TechnicalsD3.GrantUpgrade("unkillable")
								TechnicalsD3.RevokeUpgrade("missionmarker.disabled")
								TechnicalsD3.GrantUpgrade("missionmarker.enabled")
							end)
						end
						if not TechnicalsE3.IsDead and not StartVehicleE3.IsDead then
							Utils.Do(StartVehicleE3, function(vehicle)
								TechnicalsE3.EnterTransport(vehicle)
								TechnicalsE3.GrantUpgrade("unkillable")
								TechnicalsE3.RevokeUpgrade("missionmarker.disabled")
								TechnicalsE3.GrantUpgrade("missionmarker.enabled")
							end)
						end
						Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.33, 1)), function()
							Media.PlaySpeechNotification(multi3, "Target" .. Utils.Random({ "Freed", "Rescued" }))
						end)
					end
				end)
			end)
		end)
		CameraLockedTechicalSqadState3 = false
		ArmorersdetachmentQuestText3 = "You must be rescue the armorer detachment team!"
		TechicalTranHusk3 = Actor.Create("tran.husk" .. tostring(Utils.RandomInteger(1, 2)), true, { Location = PrisonerTechnicalsWaypoint3.Location, Owner = multi3 })
		CameraTechicalTranHusk3 = Actor.Create("camera.small", true, { Owner = multi3, Location = TechicalTranHusk3.Location + CVec.New(Utils.RandomInteger(1, 2), Utils.RandomInteger(-2, -1)) })
		Trigger.AfterDelay(0.0001, function()
			TechnicalsB3.GrantUpgrade("free.objective")
			CameraLockedTechicalSqad3 = Actor.Create("camera.prisoner", true, { Owner = creeps, Location = PrisonerTechnicalsWaypoint3.Location })
			Trigger.OnRemovedFromWorld(CameraLockedTechicalSqad3, function()
				Trigger.AfterDelay(DateTime.Seconds(1), function()
					if TechicalTranHusk3.IsInWorld then
						TechicalTranHusk3.Kill()
					end
				end)
			end)
		end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(6, 8)), function()
			ArmorersdetachmentQuest3 = multi3.AddSecondaryObjective(ArmorersdetachmentQuestText3)
			Media.PlaySpeechNotification(multi3, "WarningThreeMinutesRemaining")
			Beacon.New(multi3, PrisonerTechnicalsWaypoint3.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
			Trigger.AfterDelay(DateTime.Minutes(3), function()
				if CameraLockedTechicalSqad3.IsInWorld then 
					Media.PlaySpeechNotification(multi3, "WarningTwoMinutesRemaining")
					Beacon.New(multi3, PrisonerTechnicalsWaypoint3.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
				end
				Trigger.AfterDelay(DateTime.Minutes(2), function()
					if CameraLockedTechicalSqad3.IsInWorld then 
						Media.PlaySpeechNotification(multi3, "WarningOneMinuteRemaining")
						Beacon.New(multi3, PrisonerTechnicalsWaypoint3.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
					end
					Trigger.AfterDelay(DateTime.Minutes(1), function()
						if CameraLockedTechicalSqad3.IsInWorld then 
							Media.PlaySpeechNotification(multi3, "TimerStopped")
							Beacon.New(multi3, PrisonerTechnicalsWaypoint3.CenterPosition - WVec.New(512 / Utils.RandomInteger(2, 3), Utils.RandomInteger(512, 756) / 2, Utils.RandomInteger(4, 8)))
							CameraLockedTechicalSqad3.Destroy()
						end
					end)
				end)
			end)
		end)
		TechnicalsHeliHuskSlipped3 = Utils.RandomInteger(-1, 1)
		TechnicalsA3 = Actor.Create("pilot", true, { Owner = multi3, Location = PrisonerTechnicalsWaypoint3.Location + CVec.New(TechnicalsHeliHuskSlipped3, -1), SubCell = 1 })
		TechnicalsB3 = Actor.Create("pilot", true, { Owner = multi3, Location = PrisonerTechnicalsWaypoint3.Location + CVec.New(TechnicalsHeliHuskSlipped3, -1), SubCell = 2 })
		TechnicalsC3 = Actor.Create("pilot", true, { Owner = multi3, Location = PrisonerTechnicalsWaypoint3.Location + CVec.New(TechnicalsHeliHuskSlipped3, -1), SubCell = 3 })
		TechnicalsD3 = Actor.Create("pilot", true, { Owner = multi3, Location = PrisonerTechnicalsWaypoint3.Location + CVec.New(TechnicalsHeliHuskSlipped3, -1), SubCell = 4 })
		TechnicalsE3 = Actor.Create("pilot", true, { Owner = multi3, Location = PrisonerTechnicalsWaypoint3.Location + CVec.New(TechnicalsHeliHuskSlipped3, -1), SubCell = 5 })
		Technicals3 = { TechnicalsA3, TechnicalsB3, TechnicalsC3, TechnicalsD3, TechnicalsE3 }
		Utils.Do({ TechnicalsA3, TechnicalsB3, TechnicalsC3, TechnicalsD3, TechnicalsE3 }, function(t)
			Trigger.AfterDelay(DateTime.Seconds(1), function()
				t.GrantUpgrade("missionmarker.disabled")
			end)
			t.Stance = "HoldFire"
			t.GrantUpgrade("nocontrol")
		end)
		Trigger.AfterDelay(DateTime.Seconds(1), function()
			PrisonedTechnicalsSpeechTicks3() 
		end)
		Trigger.OnAllRemovedFromWorld(Technicals3, function()
			Trigger.AfterDelay(DateTime.Seconds(2), function()
				if CameraLockedTechicalSqad3.IsInWorld then
					CameraLockedTechicalSqad3.Destroy()
				end
			end)
		end)
		Trigger.OnAllKilled(Technicals3, function()
			Trigger.AfterDelay(DateTime.Seconds(1), function()
				multi3.MarkFailedObjective(ArmorersdetachmentQuest3)
			end)
			Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(99, 111)), function()
				InsertDetachmentTransportHelo3("tran", multi3, Map.ClosestEdgeCell(StartingWaypoint3.Location), StartingWaypoint3, "pilot")
			end)
		end)
	end)
end
InsertDetachmentTransportHelo0 = function(TransportType, PlayerOwner, StartEntryPoint, StartingPoint, DetachType)
	DetachmentStarting0 = StartingPoint.Location + CVec.New(Utils.RandomInteger(-2, 3), Utils.RandomInteger(4, 6))
	DetachmentPassengers0 = Reinforcements.ReinforceWithTransport(PlayerOwner, TransportType, { DetachType }, { StartEntryPoint, DetachmentStarting0 }, { Map.RandomEdgeCell() })[2]
	DetachTechnician0 = DetachmentPassengers0[1]
	Trigger.OnAddedToWorld(DetachTechnician0, function(DetachTechnician0)
		TechnicalsA0 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting0, SubCell = 1 })
		TechnicalsB0 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting0, SubCell = 2 })
		TechnicalsC0 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting0, SubCell = 3 })
		TechnicalsD0 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting0, SubCell = 4 })
		TechnicalsE0 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting0, SubCell = 5 })
		Utils.Do(StartVehicleA0, function(vehicle) 
			TechnicalsA0.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleB0, function(vehicle)
			TechnicalsB0.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleC0, function(vehicle)
			TechnicalsC0.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleD0, function(vehicle)
			TechnicalsD0.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleE0, function(vehicle) 
			TechnicalsE0.EnterTransport(vehicle) 
		end)
		Utils.Do({ TechnicalsA0, TechnicalsB0, TechnicalsC0, TechnicalsD0, TechnicalsE0 }, function(t)
			Trigger.AfterDelay(DateTime.Seconds(0), function()
				t.GrantUpgrade("missionmarker.enabled")
			end)
			t.GrantUpgrade("unkillable")
			t.GrantUpgrade("nocontrol")
			t.Stance = "HoldFire"
		end)
	end)
end
InsertDetachmentTransportHelo1 = function(TransportType, PlayerOwner, StartEntryPoint, StartingPoint, DetachType)
	DetachmentStarting1 = StartingPoint.Location + CVec.New(Utils.RandomInteger(-2, 3), Utils.RandomInteger(4, 6))
	DetachmentPassengers1 = Reinforcements.ReinforceWithTransport(PlayerOwner, TransportType, { DetachType }, { StartEntryPoint, DetachmentStarting1 }, { Map.RandomEdgeCell() })[2]
	DetachTechnician1 = DetachmentPassengers1[1]
	Trigger.OnAddedToWorld(DetachTechnician1, function(DetachTechnician1)
		TechnicalsA1 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting1, SubCell = 1 })
		TechnicalsB1 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting1, SubCell = 2 })
		TechnicalsC1 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting1, SubCell = 3 })
		TechnicalsD1 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting1, SubCell = 4 })
		TechnicalsE1 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting1, SubCell = 5 })
		Utils.Do(StartVehicleA1, function(vehicle) 
			TechnicalsA1.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleB1, function(vehicle)
			TechnicalsB1.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleC1, function(vehicle)
			TechnicalsC1.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleD1, function(vehicle)
			TechnicalsD1.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleE1, function(vehicle) 
			TechnicalsE1.EnterTransport(vehicle) 
		end)
		Utils.Do({ TechnicalsA1, TechnicalsB1, TechnicalsC1, TechnicalsD1, TechnicalsE1 }, function(t)
			Trigger.AfterDelay(DateTime.Seconds(0), function()
				t.GrantUpgrade("missionmarker.enabled")
			end)
			t.GrantUpgrade("unkillable")
			t.GrantUpgrade("nocontrol")
			t.Stance = "HoldFire"
		end)
	end)
end
InsertDetachmentTransportHelo2 = function(TransportType, PlayerOwner, StartEntryPoint, StartingPoint, DetachType)
	DetachmentStarting2 = StartingPoint.Location + CVec.New(Utils.RandomInteger(-2, 3), Utils.RandomInteger(4, 6))
	DetachmentPassengers2 = Reinforcements.ReinforceWithTransport(PlayerOwner, TransportType, { DetachType }, { StartEntryPoint, DetachmentStarting2 }, { Map.RandomEdgeCell() })[2]
	DetachTechnician2 = DetachmentPassengers2[1]
	Trigger.OnAddedToWorld(DetachTechnician2, function(DetachTechnician2)
		TechnicalsA2 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting2, SubCell = 1 })
		TechnicalsB2 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting2, SubCell = 2 })
		TechnicalsC2 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting2, SubCell = 3 })
		TechnicalsD2 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting2, SubCell = 4 })
		TechnicalsE2 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting2, SubCell = 5 })
		Utils.Do(StartVehicleA2, function(vehicle) 
			TechnicalsA2.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleB2, function(vehicle)
			TechnicalsB2.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleC2, function(vehicle)
			TechnicalsC2.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleD2, function(vehicle)
			TechnicalsD2.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleE2, function(vehicle) 
			TechnicalsE2.EnterTransport(vehicle) 
		end)
		Utils.Do({ TechnicalsA2, TechnicalsB2, TechnicalsC2, TechnicalsD2, TechnicalsE2 }, function(t)
			Trigger.AfterDelay(DateTime.Seconds(0), function()
				t.GrantUpgrade("missionmarker.enabled")
			end)
			t.GrantUpgrade("unkillable")
			t.GrantUpgrade("nocontrol")
			t.Stance = "HoldFire"
		end)
	end)
end
InsertDetachmentTransportHelo3 = function(TransportType, PlayerOwner, StartEntryPoint, StartingPoint, DetachType)
	DetachmentStarting3 = StartingPoint.Location + CVec.New(Utils.RandomInteger(-2, 3), Utils.RandomInteger(4, 6))
	DetachmentPassengers3 = Reinforcements.ReinforceWithTransport(PlayerOwner, TransportType, { DetachType }, { StartEntryPoint, DetachmentStarting3 }, { Map.RandomEdgeCell() })[2]
	DetachTechnician3 = DetachmentPassengers3[1]
	Trigger.OnAddedToWorld(DetachTechnician3, function(DetachTechnician3)
		TechnicalsA3 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting3, SubCell = 1 })
		TechnicalsB3 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting3, SubCell = 2 })
		TechnicalsC3 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting3, SubCell = 3 })
		TechnicalsD3 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting3, SubCell = 4 })
		TechnicalsE3 = Actor.Create(DetachType, true, { Owner = PlayerOwner, Location = DetachmentStarting3, SubCell = 5 })
		Utils.Do(StartVehicleA3, function(vehicle) 
			TechnicalsA3.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleB3, function(vehicle)
			TechnicalsB3.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleC3, function(vehicle)
			TechnicalsC3.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleD3, function(vehicle)
			TechnicalsD3.EnterTransport(vehicle)
		end)
		Utils.Do(StartVehicleE3, function(vehicle) 
			TechnicalsE3.EnterTransport(vehicle) 
		end)
		Utils.Do({ TechnicalsA3, TechnicalsB3, TechnicalsC3, TechnicalsD3, TechnicalsE3 }, function(t)
			Trigger.AfterDelay(DateTime.Seconds(0), function()
				t.GrantUpgrade("missionmarker.enabled")
			end)
			t.GrantUpgrade("unkillable")
			t.GrantUpgrade("nocontrol")
			t.Stance = "HoldFire"
		end)
	end)
end
PrisonedTechnicalsSpeechTicks0 = function()
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.4, 6.8)), function()
		if CameraLockedTechicalSqad0.IsInWorld then
			RandomPrisonedTechnicalsSpeech(Utils.Random(Technicals0))
			Trigger.AfterDelay(0.0001, function()
				PrisonedTechnicalsSpeechTicks0()
			end)
		end
	end)
end
PrisonedTechnicalsSpeechTicks1 = function()
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.4, 6.8)), function()
		if CameraLockedTechicalSqad1.IsInWorld then
			RandomPrisonedTechnicalsSpeech(Utils.Random(Technicals1))
			Trigger.AfterDelay(0.0001, function()
				PrisonedTechnicalsSpeechTicks1()
			end)
		end
	end)
end
PrisonedTechnicalsSpeechTicks2 = function()
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.4, 6.8)), function()
		if CameraLockedTechicalSqad2.IsInWorld then
			RandomPrisonedTechnicalsSpeech(Utils.Random(Technicals2))
			Trigger.AfterDelay(0.0001, function()
				PrisonedTechnicalsSpeechTicks2()
			end)
		end
	end)
end
PrisonedTechnicalsSpeechTicks3 = function()
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.4, 6.8)), function()
		if CameraLockedTechicalSqad3.IsInWorld then
			RandomPrisonedTechnicalsSpeech(Utils.Random(Technicals3))
			Trigger.AfterDelay(0.0001, function()
				PrisonedTechnicalsSpeechTicks3()
			end)
		end
	end)
end
RandomPrisonedTechnicalsSpeech = function(DetachmentSelf)
	DetachmentSelf.GrantTimedUpgrade("mouth.prefix", Utils.RandomInteger(44, 66))
	Media.FloatingText(Utils.Random({ Utils.Random({ "Help!", "Please!!" }) .. Utils.Random({ ", Help!", "", ", Somebody!" }) .. Utils.Random({ ", Help!", "" }), "Please somebody....", "Get out there!", "We need to escape.", "I'am prisoned.", "I don't wanna die!", "Please somebody, free me!" }), DetachmentSelf.CenterPosition + WVec.New(Utils.RandomInteger(-3, 3), Utils.RandomInteger(-3, 3), Utils.RandomInteger(-22, 22)), Utils.RandomInteger(88, 122), Utils.Random({ HSLColor.Aqua, HSLColor.Red, HSLColor.Navy, HSLColor.Cyan, HSLColor.Gray, HSLColor.LightCyan, HSLColor.OrangeRed, HSLColor.Salmon }))
end

