InsertStartInfantries0 = function()
	StartInfantriesPath0 = { StartEntryWayPoint0.Location, StartingWaypoint0.Location + CVec.New(1, 1) }
	StartInfantriesExit0 = { StartExitWayPoint0.Location }
--	Trigger.AfterDelay(DateTime.Seconds(0.5), function()
--		StartInfantriesVehicle0 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return g.Type == StartInfantriesTransport0 and g.Owner == multi0 end)
--		Utils.Do(StartInfantriesVehicle0, function(irv0)
--			irv0.GrantUpgrade("nocontrol")
--		end)
--	end)
	Utils.Do(FieldGeneral0, function(General)
		StartInfantriesWaypoint0 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(self) return self.Type == "waypoint.none" or self.Type == "waypoint.light" or self.Type == "waypoint.heavy" or self.Type == "waypoint.hero" or self.Type == "waypoint.bond" and self.Owner == multi0 end)
		local Owner = multi0
		Utils.Do(StartInfantriesWaypoint0, function(siw)
			if siw.Type == "waypoint.none" and siw.Owner == multi0 then
				StartInfantriesTransport0 = "smalltran"
				StartInfantriesCargo0 = { IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries0 = Reinforcements.ReinforceWithTransport(multi0, StartInfantriesTransport0, StartInfantriesCargo0, StartInfantriesPath0, StartInfantriesExit0)[2]
				Utils.Do(StartInfantries0, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi0, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA0 = GeneralTeamA0 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA0 = GeneralTeamA0 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General.IsDead and General.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries0, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.light" and siw.Owner == multi0 then
				StartInfantriesTransport0 = "tran"
				StartInfantriesCargo0 = { IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries0 = Reinforcements.ReinforceWithTransport(multi0, StartInfantriesTransport0, StartInfantriesCargo0, StartInfantriesPath0, { Map.ClosestEdgeCell(siw.Location) })[2]
				Utils.Do(StartInfantries0, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi0, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA0 = GeneralTeamA0 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA0 = GeneralTeamA0 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General.IsDead and General.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries0, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.heavy" and siw.Owner == multi0 then
				StartInfantriesTransport0 = "tran"
				StartInfantriesCargo0 = { IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries0 = Reinforcements.ReinforceWithTransport(multi0, StartInfantriesTransport0, StartInfantriesCargo0, StartInfantriesPath0, { Map.ClosestEdgeCell(siw.Location) })[2]
				Utils.Do(StartInfantries0, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi0, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA0 = GeneralTeamA0 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA0 = GeneralTeamA0 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General.IsDead and General.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries0, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.hero" and siw.Owner == multi0 then
				StartInfantriesTransport0 = "tran"
				StartInfantriesCargo0 = { IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries0 = Reinforcements.ReinforceWithTransport(multi0, StartInfantriesTransport0, StartInfantriesCargo0, StartInfantriesPath0, { Map.ClosestEdgeCell(siw.Location) })[2]
				Utils.Do(StartInfantries0, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi0, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA0 = GeneralTeamA0 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA0 = GeneralTeamA0 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General.IsDead and General.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries0, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.bond" and siw.Owner == multi0 then
				StartInfantriesTransport0 = "tran"
				StartInfantriesCargo0 = { IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget0[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries0 = Reinforcements.ReinforceWithTransport(multi0, StartInfantriesTransport0, StartInfantriesCargo0, StartInfantriesPath0, { Map.ClosestEdgeCell(siw.Location) })[2]
				Utils.Do(StartInfantries0, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi0, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA0 = GeneralTeamA0 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA0 = GeneralTeamA0 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General.IsDead and General.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries0, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			end
		end)
	end)
end
InsertStartInfantries1 = function()
	StartInfantriesPath1 = { StartEntryWayPoint1.Location, StartingWaypoint1.Location + CVec.New(1, 1) }
	StartInfantriesExit1 = { StartExitWayPoint1.Location }
--	Trigger.AfterDelay(DateTime.Seconds(0.5), function()
--		StartInfantriesVehicle1 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return g.Type == StartInfantriesTransport1 and g.Owner == multi1 end)
--		Utils.Do(StartInfantriesVehicle1, function(irv1)
--			irv1.GrantUpgrade("nocontrol")
--		end)
--	end)
	Utils.Do(FieldGeneral1, function(General1)
		StartInfantriesWaypoint1 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(self) return self.Type == "waypoint.none" or self.Type == "waypoint.light" or self.Type == "waypoint.heavy" or self.Type == "waypoint.hero" or self.Type == "waypoint.bond" and self.Owner == multi1 end)
		local Owner = multi1
		Utils.Do(StartInfantriesWaypoint1, function(siw)
			if siw.Type == "waypoint.none" and siw.Owner == Owner then
				StartInfantriesTransport1 = "smalltran"
				StartInfantriesCargo1 = { IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries1 = Reinforcements.ReinforceWithTransport(multi1, StartInfantriesTransport1, StartInfantriesCargo1, StartInfantriesPath1, StartInfantriesExit1)[2]
				Utils.Do(StartInfantries1, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi1, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA1 = GeneralTeamA1 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA1 = GeneralTeamA1 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General1.IsDead and General1.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General1)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries1, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.light" and siw.Owner == multi1 then
				StartInfantriesTransport1 = "tran"
				StartInfantriesCargo1 = { IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries1 = Reinforcements.ReinforceWithTransport(multi1, StartInfantriesTransport1, StartInfantriesCargo1, StartInfantriesPath1, StartInfantriesExit1)[2]
				Utils.Do(StartInfantries1, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi1, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA1 = GeneralTeamA1 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA1 = GeneralTeamA1 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General1.IsDead and General1.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General1)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries1, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.heavy" and siw.Owner == multi1 then
				StartInfantriesTransport1 = "tran"
				StartInfantriesCargo1 = { IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries1 = Reinforcements.ReinforceWithTransport(multi1, StartInfantriesTransport1, StartInfantriesCargo1, StartInfantriesPath1, StartInfantriesExit1)[2]
				Utils.Do(StartInfantries1, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi1, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA1 = GeneralTeamA1 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA1 = GeneralTeamA1 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General1.IsDead and General1.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General1)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries1, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.hero" and siw.Owner == multi1 then
				StartInfantriesTransport1 = "tran"
				StartInfantriesCargo1  = { IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries1 = Reinforcements.ReinforceWithTransport(multi1, StartInfantriesTransport1, StartInfantriesCargo1, StartInfantriesPath1, StartInfantriesExit1)[2]
				Utils.Do(StartInfantries1, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi1, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA1 = GeneralTeamA1 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA1 = GeneralTeamA1 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General1.IsDead and General1.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General1)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries1, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.bond" and siw.Owner == multi1 then
				StartInfantriesTransport1 = "tran"
				StartInfantriesCargo1  = { IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget1[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries1 = Reinforcements.ReinforceWithTransport(multi1, StartInfantriesTransport1, StartInfantriesCargo1, StartInfantriesPath1, StartInfantriesExit1)[2]
				Utils.Do(StartInfantries1, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi1, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA1 = GeneralTeamA1 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA1 = GeneralTeamA1 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General1.IsDead and General1.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General1)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries1, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			end
		end)
	end)
end
InsertStartInfantries2 = function()
	StartInfantriesPath2 = { StartEntryWayPoint2.Location, StartingWaypoint2.Location + CVec.New(1, 1) }
	StartInfantriesExit2 = { StartExitWayPoint2.Location }
--	Trigger.AfterDelay(DateTime.Seconds(0.5), function()
--		StartInfantriesVehicle2 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return g.Type == StartInfantriesTransport2 and g.Owner == multi2 end)
--		Utils.Do(StartInfantriesVehicle2, function(irv2)
--			irv2.GrantUpgrade("nocontrol")
--		end)
--	end)
	Utils.Do(FieldGeneral2, function(General2)
		StartInfantriesWaypoint2 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(self) return self.Type == "waypoint.none" or self.Type == "waypoint.light" or self.Type == "waypoint.heavy" or self.Type == "waypoint.hero" or self.Type == "waypoint.bond" and self.Owner == multi2 end)
		local Owner = multi2
		Utils.Do(StartInfantriesWaypoint2, function(siw)
			if siw.Type == "waypoint.none" and siw.Owner == multi2 then
				StartInfantriesTransport2 = "smalltran"
				StartInfantriesCargo2 = { IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries2 = Reinforcements.ReinforceWithTransport(multi2, StartInfantriesTransport2, StartInfantriesCargo2, StartInfantriesPath2, StartInfantriesExit2)[2]
				Utils.Do(StartInfantries2, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi2, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA2 = GeneralTeamA2 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA2 = GeneralTeamA2 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General2.IsDead and General2.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General2)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries2, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.light" and siw.Owner == multi2 then
				StartInfantriesTransport2 = "tran"
				StartInfantriesCargo2 = { IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries2 = Reinforcements.ReinforceWithTransport(multi2, StartInfantriesTransport2, StartInfantriesCargo2, StartInfantriesPath2, StartInfantriesExit2)[2]
				Utils.Do(StartInfantries2, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi2, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA2 = GeneralTeamA2 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA2 = GeneralTeamA2 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General2.IsDead and General2.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General2)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries2, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.heavy" and siw.Owner == multi2 then
				StartInfantriesTransport2 = "tran"
				StartInfantriesCargo2 = { IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries2 = Reinforcements.ReinforceWithTransport(multi2, StartInfantriesTransport2, StartInfantriesCargo2, StartInfantriesPath2, StartInfantriesExit2)[2]
				Utils.Do(StartInfantries2, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi2, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA2 = GeneralTeamA2 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA2 = GeneralTeamA2 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General2.IsDead and General2.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General2)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries2, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.hero" and siw.Owner == multi2 then
				StartInfantriesTransport2 = "tran"
				StartInfantriesCargo2 = { IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries2 = Reinforcements.ReinforceWithTransport(multi2, StartInfantriesTransport2, StartInfantriesCargo2, StartInfantriesPath2, StartInfantriesExit2)[2]
				Utils.Do(StartInfantries2, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi2, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA2 = GeneralTeamA2 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA2 = GeneralTeamA2 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General2.IsDead and General2.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General2)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries2, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.bond" and siw.Owner == multi2 then
				StartInfantriesTransport2 = "tran"
				StartInfantriesCargo2 = { IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget2[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries2 = Reinforcements.ReinforceWithTransport(multi2, StartInfantriesTransport2, StartInfantriesCargo2, StartInfantriesPath2, StartInfantriesExit2)[2]
				Utils.Do(StartInfantries2, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi2, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA2 = GeneralTeamA2 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA2 = GeneralTeamA2 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General2.IsDead and General2.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General2)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries2, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			end
		end)
	end)
end
InsertStartInfantries3 = function()
	StartInfantriesPath3 = { StartEntryWayPoint3.Location, StartingWaypoint3.Location + CVec.New(1, 1) }
	StartInfantriesExit3 = { StartExitWayPoint3.Location }
--	Trigger.AfterDelay(DateTime.Seconds(0.5), function()
--		StartInfantriesVehicle3 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(g) return g.Type == StartInfantriesTransport3 and g.Owner == multi3 end)
--		Utils.Do(StartInfantriesVehicle3, function(irv3)
--			irv3.GrantUpgrade("nocontrol")
--		end)
--	end)
	Utils.Do(FieldGeneral3, function(General3)
		StartInfantriesWaypoint3 = Map.ActorsInBox(Map.TopLeft, Map.BottomRight, function(self) return self.Type == "waypoint.none" or self.Type == "waypoint.light" or self.Type == "waypoint.heavy" or self.Type == "waypoint.hero" or self.Type == "waypoint.bond" and self.Owner == multi3 end)
		local Owner = multi3
		Utils.Do(StartInfantriesWaypoint3, function(siw)
			if siw.Type == "waypoint.none" and siw.Owner == multi3 then
				StartInfantriesTransport3 = "smalltran"
				StartInfantriesCargo3 = { IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries3 = Reinforcements.ReinforceWithTransport(multi3, StartInfantriesTransport3, StartInfantriesCargo3, StartInfantriesPath3, StartInfantriesExit3)[2]
				Utils.Do(StartInfantries3, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi3, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA3 = GeneralTeamA3 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA3 = GeneralTeamA3 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General3.IsDead and General3.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General3)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries3, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.light" and siw.Owner == multi3 then
				StartInfantriesTransport3 = "tran"
				StartInfantriesCargo3 = { IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries3 = Reinforcements.ReinforceWithTransport(multi3, StartInfantriesTransport3, StartInfantriesCargo3, StartInfantriesPath3, StartInfantriesExit3)[2]
				Utils.Do(StartInfantries3, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi3, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA3 = GeneralTeamA3 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA3 = GeneralTeamA3 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General3.IsDead and General3.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General3)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries3, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.heavy" and siw.Owner == multi3 then
				StartInfantriesTransport3 = "tran"
				StartInfantriesCargo3 = { IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries3 = Reinforcements.ReinforceWithTransport(multi3, StartInfantriesTransport3, StartInfantriesCargo3, StartInfantriesPath3, StartInfantriesExit3)[2]
				Utils.Do(StartInfantries3, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi3, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA3 = GeneralTeamA3 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA3 = GeneralTeamA3 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General3.IsDead and General3.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General3)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries3, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.hero" and siw.Owner == multi3 then
				StartInfantriesTransport3 = "tran"
				StartInfantriesCargo3 = { IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries3 = Reinforcements.ReinforceWithTransport(multi3, StartInfantriesTransport3, StartInfantriesCargo3, StartInfantriesPath3, StartInfantriesExit3)[2]
				Utils.Do(StartInfantries3, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi3, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA3 = GeneralTeamA3 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA3 = GeneralTeamA3 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General3.IsDead and General3.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General3)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries3, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			elseif siw.Type == "waypoint.bond" and siw.Owner == multi3 then
				StartInfantriesTransport3 = "tran"
				StartInfantriesCargo3 = { IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], IInfantryTypesAutotarget3[Utils.RandomInteger(1, 11)], "imedi" }
				StartInfantries3 = Reinforcements.ReinforceWithTransport(multi3, StartInfantriesTransport3, StartInfantriesCargo3, StartInfantriesPath3, StartInfantriesExit3)[2]
				Utils.Do(StartInfantries3, function(sinf)
					Trigger.OnAddedToWorld(sinf, function()
						Media.PlaySoundNotification(multi3, "CarDoorSound" .. Utils.RandomInteger(1, 9))
						GeneralTeamA3 = GeneralTeamA3 + 1
					end)
					Trigger.OnKilled(sinf, function()
						GeneralTeamA3 = GeneralTeamA3 - 1
					end)
					sinf.GrantUpgrade("nocontrol")
					sinf.GrantUpgrade("autocontrol")
					Trigger.OnIdle(sinf, function(a)
						if not General3.IsDead and General3.IsInWorld then
							a.Scatter()
							a.Scatter()
							a.Guard(General3)
						end
					end)
				end)
				Trigger.OnAllKilled(StartInfantries3, function()
					Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.2)), function()
					end)
				end)
			end
		end)
	end)
end

