BridgeTick = function()
	DefendOwnBridgesText0 = "Defend your Bridges [" .. bridgecountOwnDefend0 .. "!]"
	DefendOwnBridgesText1 = "Defend your Bridges [" .. bridgecountOwnDefend1 .. "!]"
	DefendOwnBridgesText2 = "Defend your Bridges [" .. bridgecountOwnDefend2 .. "!]"
	DefendOwnBridgesText3 = "Defend your Bridges [" .. bridgecountOwnDefend3 .. "!]"
	DestroyEnemyBridgesText0 = "Destroy enemy Bridges [" .. bridgecountEnemyDestroy0 .. "!]"
	DestroyEnemyBridgesText1 = "Destroy enemy Bridges [" .. bridgecountEnemyDestroy1 .. "!]"
	DestroyEnemyBridgesText2 = "Destroy enemy Bridges [" .. bridgecountEnemyDestroy2 .. "!]"
	DestroyEnemyBridgesText3 = "Destroy enemy Bridges [" .. bridgecountEnemyDestroy3 .. "!]"
	Trigger.AfterDelay(0.0001, function() BridgeTick() end)
end
SetupBridges = function()
-------------------------------------------------------------------------------	
	bridgecount0 = 0
	bridgecount1 = 0
	bridgecount2 = 0
	bridgecount3 = 0
	bridgecounter0 = function()
		bridgecount0 = bridgecount0 + 1
		if bridgecount0 == 5 then
		end
	end
	bridgecounter1 = function()
		bridgecount1 = bridgecount1 + 1
		if bridgecount1 == 5 then
		end
	end
	bridgecounter2 = function()
		bridgecount2 = bridgecount2 + 1
		if bridgecount2 == 5 then
		end
	end
	bridgecounter3 = function()
		bridgecount3 = bridgecount3 + 1
		if bridgecount3 == 5 then
		end
	end
-------------------------------------------------------------------------------	
	bridgesStart = Utils.Where(Map.ActorsInWorld, function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "br2" or actor.Type == "br3" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") end)
	Utils.Do(bridgesStart, function(br)
		br.Owner = neutral
		BridgeHero = { br }
		BridgeAttackPoints = br.Location
		BridgeAttackWaypoints = Actor.Create("waypoint", true, { Owner = clearpoint, Location = br.Location })
	end)
-------------------------------------------------------------------------------	
	NearBaseBridgesRadius = Utils.RandomInteger(48, 56)
-------------------------------------------------------------------------------	
	BridgeQuestStartTime = Utils.RandomInteger(666, 888)
	BridgeQuestSecondTime = Utils.RandomInteger(66, 88)
-------------------------------------------------------------------------------
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(8, 14)), AllBridgeDataPrints)
-------------------------------------------------------------------------------
--	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(111, 222)), SetupAllBridgesAndAttack)
end
SetupBridges0 = function()
-------------------------------------------------------------------------------	
	Trigger.AfterDelay(BridgeQuestStartTime, function()
		DefendOwnBridges0 = multi0.AddSecondaryObjective(tostring(DefendOwnBridgesText0))
		Trigger.OnAllRemovedFromWorld(BaseBridgeFlags0, function()
			multi0.MarkFailedObjective(DefendOwnBridges0)
		end)
		Trigger.AfterDelay(BridgeQuestSecondTime, function()
			DestroyEnemyBridges0 = multi0.AddSecondaryObjective(tostring(DestroyEnemyBridgesText0))
			Trigger.OnAllRemovedFromWorld(EnemyBridges0, function()
				multi0.MarkCompletedObjective(DestroyEnemyBridges0)
			end)
		end)
	end)
-------------------------------------------------------------------------------	
	NearBaseBridges0 = Map.ActorsInCircle(Map.CenterOfCell(StartingWaypoint0.Location), WDist.FromCells(NearBaseBridgesRadius), function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") and actor.Owner == neutral end)
	Utils.Do(NearBaseBridges0, function(br0)
		Trigger.AfterDelay(BridgeQuestStartTime, function() br0.GrantUpgrade("normal.objective") end)
		br0.Owner = multi0
		BaseBridges0 = { br0 }
		BridgeAttackPoints0 = br0.Location
		BridgeAttackWaypoints0 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = br0.Location })
		NearBaseBridgeFlags0 = Actor.Create("ctflag", true, { Owner = multi0, Location = br0.Location })
		Trigger.OnAddedToWorld(NearBaseBridgeFlags0, function()
			bridgecountOwnDefend0 = bridgecountOwnDefend0 + 1
			bridgecountEnemyDestroy1 = bridgecountEnemyDestroy1 + 1
			bridgecountEnemyDestroy2 = bridgecountEnemyDestroy2 + 1
			bridgecountEnemyDestroy3 = bridgecountEnemyDestroy3 + 1
		end)
	end)
-------------------------------------------------------------------------------	
	Trigger.AfterDelay(1, function()
		EnemyBridges0 = Utils.Where(Map.ActorsInWorld, function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") and (actor.Owner == multi1 or actor.Owner == multi2 or actor.Owner == multi3) end)
		Utils.Do(EnemyBridges0, function(eb0)
			EnemyBridgeAttackPoints0 = eb0.Location
			EnemyBridgeAttackWaypoints0 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = eb0.Location })
			Trigger.AfterDelay(BridgeQuestStartTime + BridgeQuestSecondTime, function() eb0.GrantUpgrade(Utils.Random({ "attack", "destroy" }) .. ".objective") end)
			Trigger.AfterDelay(BridgeQuestStartTime + BridgeQuestSecondTime, function() EnemySmallCameraBridges0 = Actor.Create("camera.small", true, { Owner = multi0, Location = eb0.Location + CVec.New(2, 1) }) end)
		end)
		Trigger.AfterDelay(1, function()
			BaseBridgeFlags0 = Map.ActorsInCircle(Map.CenterOfCell(StartingWaypoint0.Location), WDist.FromCells(NearBaseBridgesRadius + 3), function(actor) return actor.Type == "ctflag" and actor.Owner == multi0 end)
			Utils.Do(BaseBridgeFlags0, function(bbf0)
			end)
			Trigger.OnAnyKilled(BaseBridgeFlags0, function()
				bridgecountOwnDefend0 = bridgecountOwnDefend0 - 1
				bridgecountEnemyDestroy1 = bridgecountEnemyDestroy1 - 1
				bridgecountEnemyDestroy2 = bridgecountEnemyDestroy2 - 1
				bridgecountEnemyDestroy3 = bridgecountEnemyDestroy3 - 1
			end)
		end)
	end)
end
SetupBridges1 = function()
-------------------------------------------------------------------------------	
	Trigger.AfterDelay(BridgeQuestStartTime, function()
		DefendOwnBridges1 = multi1.AddSecondaryObjective(tostring(DefendOwnBridgesText1))
		Trigger.OnAllRemovedFromWorld(BaseBridgeFlags1, function()
			multi1.MarkFailedObjective(DefendOwnBridges1)
		end)
		Trigger.AfterDelay(BridgeQuestSecondTime, function()
			DestroyEnemyBridges1 = multi1.AddSecondaryObjective(tostring(DestroyEnemyBridgesText1))
			Trigger.OnAllRemovedFromWorld(EnemyBridges1, function()
				multi1.MarkCompletedObjective(DestroyEnemyBridges1)
			end)
		end)
	end)
-------------------------------------------------------------------------------	
	NearBaseBridges1 = Map.ActorsInCircle(Map.CenterOfCell(StartingWaypoint1.Location), WDist.FromCells(NearBaseBridgesRadius), function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") and actor.Owner == neutral end)
	Utils.Do(NearBaseBridges1, function(br1)
		Trigger.AfterDelay(BridgeQuestStartTime, function() br1.GrantUpgrade("normal.objective") end)
		br1.Owner = multi1
		BaseBridges1 = { br1 }
		BridgeAttackPoints1 = br1.Location
		BridgeAttackWaypoints1 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = br1.Location })
		NearBaseBridgeFlags1 = Actor.Create("ctflag", true, { Owner = multi1, Location = br1.Location })
		Trigger.OnAddedToWorld(NearBaseBridgeFlags1, function()
			bridgecountOwnDefend1 = bridgecountOwnDefend1 + 1
			bridgecountEnemyDestroy0 = bridgecountEnemyDestroy0 + 1
			bridgecountEnemyDestroy2 = bridgecountEnemyDestroy2 + 1
			bridgecountEnemyDestroy3 = bridgecountEnemyDestroy3 + 1
		end)
	end)
-------------------------------------------------------------------------------	
	Trigger.AfterDelay(1, function()
		EnemyBridges1 = Utils.Where(Map.ActorsInWorld, function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") and (actor.Owner == multi0 or actor.Owner == multi2 or actor.Owner == multi3) end)
		Utils.Do(EnemyBridges1, function(eb1)
			EnemyBridgeAttackPoints1 = eb1.Location
			EnemyBridgeAttackWaypoints1 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = eb1.Location })
			Trigger.AfterDelay(BridgeQuestStartTime + BridgeQuestSecondTime, function() eb1.GrantUpgrade(Utils.Random({ "attack", "destroy" }) .. ".objective") end)
			Trigger.AfterDelay(BridgeQuestStartTime + BridgeQuestSecondTime, function() EnemySmallCameraBridges1 = Actor.Create("camera.small", true, { Owner = multi1, Location = eb1.Location + CVec.New(2, 1) }) end)
		end)
		Trigger.AfterDelay(1, function()
			BaseBridgeFlags1 = Map.ActorsInCircle(Map.CenterOfCell(StartingWaypoint1.Location), WDist.FromCells(NearBaseBridgesRadius + 3), function(actor) return actor.Type == "ctflag" and actor.Owner == multi1 end)
			Utils.Do(BaseBridgeFlags1, function(bbf1)
			end)
			Trigger.OnAnyKilled(BaseBridgeFlags1, function()
				bridgecountOwnDefend1 = bridgecountOwnDefend1 - 1
				bridgecountEnemyDestroy0 = bridgecountEnemyDestroy0 - 1
				bridgecountEnemyDestroy2 = bridgecountEnemyDestroy2 - 1
				bridgecountEnemyDestroy3 = bridgecountEnemyDestroy3 - 1
			end)
		end)
	end)
end
SetupBridges2 = function()
-------------------------------------------------------------------------------	
	Trigger.AfterDelay(BridgeQuestStartTime, function()
		DefendOwnBridges2 = multi2.AddSecondaryObjective(tostring(DefendOwnBridgesText2))
		Trigger.OnAllRemovedFromWorld(BaseBridgeFlags2, function()
			multi2.MarkFailedObjective(DefendOwnBridges2)
		end)
		Trigger.AfterDelay(BridgeQuestSecondTime, function()
			DestroyEnemyBridges2 = multi2.AddSecondaryObjective(tostring(DestroyEnemyBridgesText2))
			Trigger.OnAllRemovedFromWorld(EnemyBridges2, function()
				multi2.MarkCompletedObjective(DestroyEnemyBridges2)
			end)
		end)
	end)
-------------------------------------------------------------------------------	
	NearBaseBridges2 = Map.ActorsInCircle(Map.CenterOfCell(StartingWaypoint2.Location), WDist.FromCells(NearBaseBridgesRadius), function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") and actor.Owner == neutral end)
	Utils.Do(NearBaseBridges2, function(br2)
		Trigger.AfterDelay(BridgeQuestStartTime, function() br2.GrantUpgrade("normal.objective") end)
		br2.Owner = multi2
		BaseBridges2 = { br2 }
		BridgeAttackPoints2 = br2.Location
		BridgeAttackWaypoints2 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = br2.Location })
		NearBaseBridgeFlags2 = Actor.Create("ctflag", true, { Owner = multi2, Location = br2.Location })
		Trigger.OnAddedToWorld(NearBaseBridgeFlags2, function()
			bridgecountOwnDefend2 = bridgecountOwnDefend2 + 1
			bridgecountEnemyDestroy0 = bridgecountEnemyDestroy0 + 1
			bridgecountEnemyDestroy1 = bridgecountEnemyDestroy1 + 1
			bridgecountEnemyDestroy3 = bridgecountEnemyDestroy3 + 1
		end)
	end)
-------------------------------------------------------------------------------	
	Trigger.AfterDelay(1, function()
		EnemyBridges2 = Utils.Where(Map.ActorsInWorld, function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") and (actor.Owner == multi0 or actor.Owner == multi1 or actor.Owner == multi3) end)
		Utils.Do(EnemyBridges2, function(eb2)
			EnemyBridgeAttackPoints2 = eb2.Location
			EnemyBridgeAttackWaypoints2 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = eb2.Location })
			Trigger.AfterDelay(BridgeQuestStartTime + BridgeQuestSecondTime, function() eb2.GrantUpgrade(Utils.Random({ "attack", "destroy" }) .. ".objective") end)
			Trigger.AfterDelay(BridgeQuestStartTime + BridgeQuestSecondTime, function() EnemySmallCameraBridges2 = Actor.Create("camera.small", true, { Owner = multi2, Location = eb2.Location + CVec.New(2, 1) }) end)
		end)
		Trigger.AfterDelay(1, function()
			BaseBridgeFlags2 = Map.ActorsInCircle(Map.CenterOfCell(StartingWaypoint2.Location), WDist.FromCells(NearBaseBridgesRadius + 3), function(actor) return actor.Type == "ctflag" and actor.Owner == multi2 end)
			Utils.Do(BaseBridgeFlags2, function(bbf2)
			end)
			Trigger.OnAnyKilled(BaseBridgeFlags2, function()
				bridgecountOwnDefend2 = bridgecountOwnDefend2 - 1
				bridgecountEnemyDestroy0 = bridgecountEnemyDestroy0 - 1
				bridgecountEnemyDestroy1 = bridgecountEnemyDestroy1 - 1
				bridgecountEnemyDestroy3 = bridgecountEnemyDestroy3 - 1
			end)
		end)
	end)
end
SetupBridges3 = function()
-------------------------------------------------------------------------------	
	Trigger.AfterDelay(BridgeQuestStartTime, function()
		DefendOwnBridges3 = multi3.AddSecondaryObjective(tostring(DefendOwnBridgesText3))
		Trigger.OnAllRemovedFromWorld(BaseBridgeFlags3, function()
			multi3.MarkFailedObjective(DefendOwnBridges3)
		end)
		Trigger.AfterDelay(BridgeQuestSecondTime, function()
			DestroyEnemyBridges3 = multi3.AddSecondaryObjective(tostring(DestroyEnemyBridgesText3))
			Trigger.OnAllRemovedFromWorld(EnemyBridges3, function()
				multi3.MarkCompletedObjective(DestroyEnemyBridges3)
			end)
		end)
	end)
-------------------------------------------------------------------------------	
	NearBaseBridges3 = Map.ActorsInCircle(Map.CenterOfCell(StartingWaypoint3.Location), WDist.FromCells(NearBaseBridgesRadius), function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") and actor.Owner == neutral end)
	Utils.Do(NearBaseBridges3, function(br3)
		Trigger.AfterDelay(BridgeQuestStartTime, function() br3.GrantUpgrade("normal.objective") end)
		br3.Owner = multi3
		BaseBridges3 = { br3 }
		BridgeAttackPoints3 = br3.Location
		BridgeAttackWaypoints3 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = br3.Location })
		NearBaseBridgeFlags3 = Actor.Create("ctflag", true, { Owner = multi3, Location = br3.Location })
		Trigger.OnAddedToWorld(NearBaseBridgeFlags3, function()
			bridgecountOwnDefend3 = bridgecountOwnDefend3 + 1
			bridgecountEnemyDestroy0 = bridgecountEnemyDestroy0 + 1
			bridgecountEnemyDestroy1 = bridgecountEnemyDestroy1 + 1
			bridgecountEnemyDestroy2 = bridgecountEnemyDestroy2 + 1
		end)
	end)
-------------------------------------------------------------------------------	
	Trigger.AfterDelay(1, function()
		EnemyBridges3 = Utils.Where(Map.ActorsInWorld, function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") and (actor.Owner == multi0 or actor.Owner == multi1 or actor.Owner == multi2) end)
		Utils.Do(EnemyBridges3, function(eb3)
			EnemyBridgeAttackPoints3 = eb3.Location
			EnemyBridgeAttackWaypoints3 = Actor.Create("waypoint", true, { Owner = clearpoint, Location = eb3.Location })
			Trigger.AfterDelay(BridgeQuestStartTime + BridgeQuestSecondTime, function() eb3.GrantUpgrade(Utils.Random({ "attack", "destroy" }) .. ".objective") end)
			Trigger.AfterDelay(BridgeQuestStartTime + BridgeQuestSecondTime, function() EnemySmallCameraBridges3 = Actor.Create("camera.small", true, { Owner = multi3, Location = eb3.Location + CVec.New(2, 1) }) end)
		end)
		Trigger.AfterDelay(1, function()
			BaseBridgeFlags3 = Map.ActorsInCircle(Map.CenterOfCell(StartingWaypoint3.Location), WDist.FromCells(NearBaseBridgesRadius + 3), function(actor) return actor.Type == "ctflag" and actor.Owner == multi3 end)
			Utils.Do(BaseBridgeFlags3, function(bbf3)
			end)
			Trigger.OnAnyKilled(BaseBridgeFlags3, function()
				bridgecountOwnDefend3 = bridgecountOwnDefend3 - 1
				bridgecountEnemyDestroy0 = bridgecountEnemyDestroy0 - 1
				bridgecountEnemyDestroy1 = bridgecountEnemyDestroy1 - 1
				bridgecountEnemyDestroy2 = bridgecountEnemyDestroy2 - 1
			end)
		end)
	end)
end
-------------------------------------------------------------------------------	
AllBridgeDataPrints = function()
	local AllBridgeData = Utils.Where(Map.ActorsInWorld, function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "br2" or actor.Type == "br3" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") end)
	Utils.Do(AllBridgeData, function(abd)
		if abd.Owner == multi0 then
			Media.FloatingText("[Type: |" .. abd.Type .. "|]\n[Health: |" .. abd.MaxHealth .. "|/|" .. abd.Health .. "|]\n[Owner: |" .. multi0.Name .. "|]", abd.CenterPosition, Utils.RandomInteger(122, 144), Utils.Random({ multi0.Color, HSLColor.LawnGreen }))
		elseif abd.Owner == multi1 then
			Media.FloatingText("[Type: |" .. abd.Type .. "|]\n[Health: |" .. abd.MaxHealth .. "|/|" .. abd.Health .. "|]\n[Owner: |" .. multi1.Name .. "|]", abd.CenterPosition, Utils.RandomInteger(122, 144), Utils.Random({ multi1.Color, HSLColor.LawnGreen }))
		elseif abd.Owner == multi2 then
			Media.FloatingText("[Type: |" .. abd.Type .. "|]\n[Health: |" .. abd.MaxHealth .. "|/|" .. abd.Health .. "|]\n[Owner: |" .. multi2.Name .. "|]", abd.CenterPosition, Utils.RandomInteger(122, 144), Utils.Random({ multi2.Color, HSLColor.LawnGreen }))
		elseif abd.Owner == multi3 then
			Media.FloatingText("[Type: |" .. abd.Type .. "|]\n[Health: |" .. abd.MaxHealth .. "|/|" .. abd.Health .. "|]\n[Owner: |" .. multi3.Name .. "|]", abd.CenterPosition, Utils.RandomInteger(122, 144), Utils.Random({ multi3.Color, HSLColor.LawnGreen }))
		elseif abd.Owner == neutral then
			Media.FloatingText("[Type: |" .. abd.Type .. "|]\n[Health: |" .. abd.MaxHealth .. "|/|" .. abd.Health .. "|]\n[Owner: |" .. "Neutral" .. "|]", abd.CenterPosition, Utils.RandomInteger(122, 144), Utils.Random({ HSLColor.Orange, HSLColor.LawnGreen, HSLColor.Yellow, HSLColor.Teal, HSLColor.Brown, HSLColor.Magenta, HSLColor.Maroon, HSLColor.SkyBlue }))
		else
			Media.FloatingText("[Type: |" .. abd.Type .. "|]\n[Health: |" .. abd.MaxHealth .. "|/|" .. abd.Health .. "|]", abd.CenterPosition, Utils.RandomInteger(122, 144), Utils.Random({ HSLColor.Orange, HSLColor.LawnGreen, HSLColor.Yellow, HSLColor.Teal, HSLColor.Brown, HSLColor.Magenta, HSLColor.Maroon, HSLColor.SkyBlue }))
		end
		if abd.Health <= 0.22 * abd.MaxHealth then
			abd.GrantUpgrade("warning.prefix")
		end
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(6666, 9999)), AllBridgeDataPrints)
end
-------------------------------------------------------------------------------	
SetupAllBridgesAndAttack = function()
	SetupedBridgesStart = Utils.Where(Map.ActorsInWorld, function(actor) return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "br2" or actor.Type == "br3" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4") end)
	Utils.Do(SetupedBridgesStart, function(sbr)
--		sbr.GrantUpgrade("missionmarker.enabled")
--		sbr.GrantUpgrade("normal.objective")
--		sbr.GrantUpgrade("warning.prefix")
--		sbr.GrantUpgrade("attack.objective")
--		sbr.GrantUpgrade("destroy.objective")
--		sbr.GrantUpgrade("destroyall.objective")
		SetupedBridgesAttackPoints = sbr.Location
		SetupedBridgesAttackWaypoints = Actor.Create("waypoint", true, { Owner = clearpoint, Location = sbr.Location })
	end)
	Trigger.AfterDelay(DateTime.Seconds(0.000001), function() 
--		SetupedBridgesAttackCenterCells = Map.CenterOfCell(SetupedBridgesAttackWaypoints.Location)
--		SetupedBridgesAttackPoint = SetupedBridgesAttackCenterCells.CenterPosition
		Trigger.AfterDelay(DateTime.Seconds(0.000001), function() 
			InsertBridgeTank()
		end)
	end)
	SetupedBridgesRadius = WDist.FromCells(1.3333)
end
-------------------------------------------------------------------------------	
InsertBridgeTank = function()
	BridgeTank = Actor.Create(Utils.Random({ "1tnk", "2tnk", "3tnk", "apc.tower", "ftrk", "raytnk", "stnk", "ctnk", "latnk", "vettnk", "ftnk", "totnk", "ttnk", "ntnk", "arty", "v2rl", "mechw" }), true, { Owner = Utils.Random({ allies, england, france, germany, ussr, russia, ukraine, china }), Location = MidleWaypoint.Location + CVec.New(Utils.RandomInteger(-3, 3), Utils.RandomInteger(-3, 3)), Facing = Utils.RandomInteger(0, 255) })
--	SetupedBridges = Map.ActorsInCircle(SetupedBridgesAttackCenterCells, SetupedBridgesRadius, function(actor)
--		return (actor.Type == "bridge1" or actor.Type == "bridge2" or actor.Type == "br1" or actor.Type == "br2" or actor.Type == "br3" or actor.Type == "sbridge1" or actor.Type == "sbridge2" or actor.Type == "sbridge3" or actor.Type == "sbridge4")
--	end)[1]
	BridgeTank.GrantUpgrade("attack.objective")
	BridgeTank.GrantUpgrade("nocontrol")
	BridgeTank.GrantUpgrade("autocontrol")
	BridgeTank.GrantUpgrade("wandering")
	BridgeTank.Stance = "AttackAnything"
	BridgeTank.AttackMove(SetupedBridgesAttackWaypoints.Location, Utils.RandomInteger(2, 4))
	Trigger.OnRemovedFromWorld(BridgeTank, function()
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(122, 244)), SetupAllBridgesAndAttack)
	end)
end
-------------------------------------------------------------------------------	

