InsertGiantAntQueen = function()
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.2, 0.6)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.4)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
	CameraGiantAntQueenDistorsedScaleHorizontical = Utils.RandomInteger(-1, 1)
	CameraGiantAntQueenDistorsedScaleVertical = Utils.RandomInteger(-1, -2)
	GiantAntQueen = Actor.Create("quee", true, { Location = GiantAntQueenWaypoint.Location, Owner = ants })
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.1, 2.2)), function()
		Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" }))
		CameraGiantAntQueen0 = Actor.Create("camera.kill", true, { Owner = multi0, Location = GiantAntQueenWaypoint.Location + CVec.New(CameraGiantAntQueenDistorsedScaleHorizontical, CameraGiantAntQueenDistorsedScaleVertical) })
		CameraGiantAntQueen1 = Actor.Create("camera.kill", true, { Owner = multi1, Location = GiantAntQueenWaypoint.Location + CVec.New(CameraGiantAntQueenDistorsedScaleHorizontical, CameraGiantAntQueenDistorsedScaleVertical) })
		CameraGiantAntQueen2 = Actor.Create("camera.kill", true, { Owner = multi2, Location = GiantAntQueenWaypoint.Location + CVec.New(CameraGiantAntQueenDistorsedScaleHorizontical, CameraGiantAntQueenDistorsedScaleVertical) })
		CameraGiantAntQueen3 = Actor.Create("camera.kill", true, { Owner = multi3, Location = GiantAntQueenWaypoint.Location + CVec.New(CameraGiantAntQueenDistorsedScaleHorizontical, CameraGiantAntQueenDistorsedScaleVertical) })
		Camera.Position = GiantAntQueenWaypoint.CenterPosition
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.2, 1.4)), function()
		Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" }))
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(6.6, 8.8)), 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.OnKilled(GiantAntQueen, function()
		Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" }))
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.2, 1.4)), function()
			if multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
			else
				Media.PlayMovieInRadar("antend.vqa", nil)
			end
		end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function()
			if CameraGiantAntQueen0.IsInWorld then CameraGiantAntQueen0.Destroy() end
			if CameraGiantAntQueen1.IsInWorld then CameraGiantAntQueen1.Destroy() end
			if CameraGiantAntQueen2.IsInWorld then CameraGiantAntQueen2.Destroy() end
			if CameraGiantAntQueen3.IsInWorld then CameraGiantAntQueen3.Destroy() end
		end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(444.4444, 888.8888)), function() InsertGiantAntQueen() end)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2.1, 3.2)), function() 
		if multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
		else
			Media.PlayMovieInRadar("antintro.vqa", nil)
		end
		if not GiantAntQueen.IsDead and GiantAntQueen.IsInWorld then InsertAntQueenGuards() end 
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() InsertAntLarvae00() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() InsertAntLarvae01() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() InsertAntLarvae02() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() InsertAntLarvae03() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() InsertAntLarvae04() end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(4, 8)), function() AntQueenSpeach() end)
end
AntQueenSpeach = function()
	if GiantAntQueen.IsInWorld and not GiantAntQueen.IsDead then
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.2, 0.6)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.4)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Media.FloatingText(Utils.Random({ "SLURP", "FAPP", "SLAGH", "PRHOAAR", "PHLAF", "KRATT", "PLOOGH" }), GiantAntQueenWaypoint.CenterPosition, Utils.RandomInteger(33, 66), Utils.Random({ HSLColor.DarkRed, HSLColor.DarkOrange, HSLColor.Red, HSLColor.Orange }))
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(4, 8)), AntQueenSpeach)
	end
end
InsertAntQueenGuards = function()
	AntQueenGuards = Reinforcements.Reinforce(ants, AntQueenGuardTypes, { GiantAntQueenWaypoint.Location + CVec.New(Utils.RandomInteger(-2, 2), Utils.RandomInteger(-2, 2)) }, Utils.RandomInteger(33, 66))
	Utils.Do(AntQueenGuards, function(a)
		a.Owner = ants
		a.Stance = "AttackAnything"
		a.GrantUpgrade("nocontrol")
		a.GrantUpgrade("autocontrol")
		a.GrantUpgrade("wandering")
		Trigger.OnIdle(a, function(a)
			if not a.IsDead and a.IsInWorld then
				a.Patrol({GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) }), Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) })), GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) }), Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) })), GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) }), Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) })), GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) }), Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) })), GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) }), Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) })), GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) }), Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) }))}, true, Utils.RandomInteger(66, 122)) 
			end 
		end)
	end)
	Trigger.OnAllRemovedFromWorld(AntQueenGuards, function()
		Trigger.AfterDelay(DateTime.Seconds(AntQueenGuardsRespawnTime), function() if not GiantAntQueen.IsDead and GiantAntQueen.IsInWorld then InsertAntQueenGuards() end end)
	end)
end
InsertAntLarvae00 = function()
	if not GiantAntQueen.IsDead and GiantAntQueen.IsInWorld then
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.2, 0.6)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.4)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		AntLarvae00 = Actor.Create("lar" .. tostring(Utils.RandomInteger(1, 4)), true, { Location = GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-2, -1), Utils.RandomInteger(3, 4) }), Utils.Random({ Utils.RandomInteger(-2, -1), Utils.RandomInteger(1, 2) })), Owner = neutral })
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.111, 222.222)), function() if not AntLarvae00.IsDead and AntLarvae00.IsInWorld then AntLarvae00.Kill() end end)
		Trigger.OnRemovedFromWorld(AntLarvae00, function()
			Trigger.AfterDelay(DateTime.Seconds(0.00001), function() 
				local Ant = Map.ActorsInCircle(GiantAntQueenWaypoint.CenterPosition, WDist.FromCells(6), function(ant) return (ant.Type == "ant" or ant.Type == "ant1" or ant.Type == "ant2" or ant.Type == "ant3" or ant.Type == "scorp") and ant.Owner == neutral end)
				Utils.Do(Ant, function(a)
					a.Owner = ants
					a.Stance = "AttackAnything"
					a.GrantUpgrade("nocontrol")
					a.GrantUpgrade("autocontrol")
					a.GrantUpgrade("wandering")
				end)
				Media.PlaySound("antbite.aud")
				Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() InsertAntLarvae00() end)
			end)
		end)
	end
end
InsertAntLarvae01 = function()
	if not GiantAntQueen.IsDead and GiantAntQueen.IsInWorld then
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.2, 0.6)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.4)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		AntLarvae01 = Actor.Create("lar" .. tostring(Utils.RandomInteger(1, 4)), true, { Location = GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-2, -1), Utils.RandomInteger(3, 4) }), Utils.Random({ Utils.RandomInteger(-2, -1), Utils.RandomInteger(1, 2) })), Owner = neutral })
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() if not AntLarvae01.IsDead and AntLarvae01.IsInWorld then AntLarvae01.Kill() end end)
		Trigger.OnRemovedFromWorld(AntLarvae01, function()
			Trigger.AfterDelay(DateTime.Seconds(0.00001), function() 
				local Ant = Map.ActorsInCircle(GiantAntQueenWaypoint.CenterPosition, WDist.FromCells(6), function(ant) return (ant.Type == "ant" or ant.Type == "ant1" or ant.Type == "ant2" or ant.Type == "ant3" or ant.Type == "scorp") and ant.Owner == neutral end)
				Utils.Do(Ant, function(a)
					a.Owner = ants
					a.Stance = "AttackAnything"
					a.GrantUpgrade("nocontrol")
					a.GrantUpgrade("autocontrol")
					a.GrantUpgrade("wandering")
				end)
				Media.PlaySound("antbite.aud")
				Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() InsertAntLarvae01() end)
			end)
		end)
	end
end
InsertAntLarvae02 = function()
	if not GiantAntQueen.IsDead and GiantAntQueen.IsInWorld then
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.2, 0.6)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.4)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		AntLarvae02 = Actor.Create("lar" .. tostring(Utils.RandomInteger(1, 4)), true, { Location = GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-3, -1), Utils.RandomInteger(3, 5) }), Utils.Random({ Utils.RandomInteger(-2, -1), Utils.RandomInteger(1, 2) })), Owner = neutral })
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() if not AntLarvae02.IsDead and AntLarvae02.IsInWorld then AntLarvae02.Kill() end end)
		Trigger.OnRemovedFromWorld(AntLarvae02, function()
			Trigger.AfterDelay(DateTime.Seconds(0.00001), function() 
				local Ant = Map.ActorsInCircle(GiantAntQueenWaypoint.CenterPosition, WDist.FromCells(6), function(ant) return (ant.Type == "ant" or ant.Type == "ant1" or ant.Type == "ant2" or ant.Type == "ant3") and ant.Owner == neutral end)
				Utils.Do(Ant, function(a)
					a.Owner = ants
					a.Stance = "AttackAnything"
					a.GrantUpgrade("nocontrol")
					a.GrantUpgrade("autocontrol")
					a.GrantUpgrade("wandering")
				end)
				Media.PlaySound("antbite.aud")
				Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() InsertAntLarvae02() end)
			end)
		end)
	end
end
InsertAntLarvae03 = function()
	if not GiantAntQueen.IsDead and GiantAntQueen.IsInWorld then
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.2, 0.6)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.4)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		AntLarvae03 = Actor.Create("lar" .. tostring(Utils.RandomInteger(1, 4)), true, { Location = GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-2, -1), Utils.RandomInteger(3, 4) }), Utils.Random({ Utils.RandomInteger(-2, -1), Utils.RandomInteger(1, 2) })), Owner = neutral })
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() if not AntLarvae03.IsDead and AntLarvae03.IsInWorld then AntLarvae03.Kill() end end)
		Trigger.OnRemovedFromWorld(AntLarvae03, function()
			Trigger.AfterDelay(DateTime.Seconds(0.00001), function() 
				local Ant = Map.ActorsInCircle(GiantAntQueenWaypoint.CenterPosition, WDist.FromCells(6), function(ant) return (ant.Type == "ant" or ant.Type == "ant1" or ant.Type == "ant2" or ant.Type == "ant3" or ant.Type == "scorp") and ant.Owner == neutral end)
				Utils.Do(Ant, function(a)
					a.Owner = ants
					a.Stance = "AttackAnything"
					a.GrantUpgrade("nocontrol")
					a.GrantUpgrade("autocontrol")
					a.GrantUpgrade("wandering")
				end)
				Media.PlaySound("antbite.aud")
				Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() InsertAntLarvae03() end)
			end)
		end)
	end
end
InsertAntLarvae04 = function()
	if not GiantAntQueen.IsDead and GiantAntQueen.IsInWorld then
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.2, 0.6)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(0.8, 1.4)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function() Media.PlaySound(Utils.Random({ "antbite.aud", "antdie.aud", "vicer1.aud" })) end)
		AntLarvae04 = Actor.Create("lar" .. tostring(Utils.RandomInteger(1, 4)), true, { Location = GiantAntQueenWaypoint.Location + CVec.New(Utils.Random({ Utils.RandomInteger(-2, -1), Utils.RandomInteger(3, 4) }), Utils.Random({ Utils.RandomInteger(-2, -1), Utils.RandomInteger(1, 2) })), Owner = neutral })
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() if not AntLarvae04.IsDead and AntLarvae04.IsInWorld then AntLarvae04.Kill() end end)
		Trigger.OnRemovedFromWorld(AntLarvae04, function()
			Trigger.AfterDelay(DateTime.Seconds(0.00001), function() 
				local Ant = Map.ActorsInCircle(GiantAntQueenWaypoint.CenterPosition, WDist.FromCells(6), function(ant) return (ant.Type == "ant" or ant.Type == "ant1" or ant.Type == "ant2" or ant.Type == "ant3" or ant.Type == "scorp") and ant.Owner == neutral end)
				Utils.Do(Ant, function(a)
					a.Owner = ants
					a.Stance = "AttackAnything"
					a.GrantUpgrade("nocontrol")
					a.GrantUpgrade("autocontrol")
					a.GrantUpgrade("wandering")
				end)
				Media.PlaySound("antbite.aud")
				Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111.1111, 222.222)), function() InsertAntLarvae04() end)
			end)
		end)
	end
end

