ObjectivesTick = function()
	if multi0.HasNoRequiredUnits() and not multi0.IsObjectiveFailed(ConquestVictoryConditions0) then
		multi0.MarkFailedObjective(ConquestVictoryConditions0)
	end
	if multi1.HasNoRequiredUnits() and not multi1.IsObjectiveFailed(ConquestVictoryConditions1) then
		multi1.MarkFailedObjective(ConquestVictoryConditions1)
	end
	if multi2.HasNoRequiredUnits() and not multi2.IsObjectiveFailed(ConquestVictoryConditions2) then
		multi2.MarkFailedObjective(ConquestVictoryConditions2)
	end
	if multi3.HasNoRequiredUnits() and not multi3.IsObjectiveFailed(ConquestVictoryConditions3) then
		multi3.MarkFailedObjective(ConquestVictoryConditions3)
	end
	Trigger.AfterDelay(1, function()
		ObjectivesTick()
	end)
end
InitObjectives = function()
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	NationGeneralHealth0 = "None"
	NationGeneralHealth1 = "None"
	NationGeneralHealth2 = "None"
	NationGeneralHealth3 = "None"
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	RandomUsaInvocation = Utils.Random({ "Mister", "Sir", "Commander" })
	RandomEnglandInvocation = Utils.Random({ "Mister", "Sir", "Commander" })
	RandomFranceInvocation = Utils.Random({ "Monsieur", "Sieur", "Commandes" })
	RandomGermanyInvocation = Utils.Random({ "Herr", "Herr General", "Fuhrer" })
	RandomChineseInvocation = Utils.Random({ "Xiansheng", "XianSheng", "Xian-Sheng", "Xian" })
	RandomRussiaInvocation = Utils.Random({ "Comrade", "General" })
	RandomUkraineInvocation = Utils.Random({ "Comrade", "General" })
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	Utils.Do(players, function(player)
		if player.Faction == "allies" then
			Invocation = tostring(RandomUsaInvocation)
		elseif player.Faction == "england" or player.Faction == "greece" then
			Invocation = tostring(RandomEnglandInvocation)
		elseif player.Faction == "france" or player.Faction == "spain" then
			Invocation = tostring(RandomFranceInvocation)
		elseif player.Faction == "germany" then
			Invocation = tostring(RandomGermanyInvocation)
		elseif player.Faction == "soviet" then
			Invocation = tostring(RandomChineseInvocation)
		elseif player.Faction == "russia" then
			Invocation = tostring(RandomGermanyInvocation)
		elseif player.Faction == "ukraine" or player.Faction == "turkey" then
			Invocation = tostring(RandomUkraineInvocation)
		end
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(26, 32)), function()
		Utils.Do(players, function(player)
			contactisis = player.AddSecondaryObjective(Utils.Random({ "Locate", "Find", "Explore", "Detect", "Search" }) .. " the Islamic State's " .. Utils.Random({ "Terrorist-Compound!", "Training-Site!", "Secret-Base!" }))
			Trigger.OnPlayerDiscovered(isis, function(_, discoverer)
				if discoverer == player and not player.IsObjectiveCompleted(contactisis) then
					if not isis.HasNoRequiredUnits() then
						Media.PlaySoundNotification(multi0 or multi1 or multi2 or multi3, "CameraSound")
						Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2.4, 4.2)), function()
							Media.PlaySpeechNotification(multi0 or multi1 or multi2 or multi3, "KaneSpeechSound" .. Utils.RandomInteger(2, 3))
						end)
						Media.DisplayMessage("|Islamic-State Detected|", "[FirstContact]", isis.Color)
						player.MarkCompletedObjective(contactisis)
					end
				end
			end)
		end)
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(36, 42)), function()
		Utils.Do(players, function(player)
			contactnod = player.AddSecondaryObjective(Utils.Random({ "Locate", "Find", "Explore", "Detect", "Search" }) .. " the Brotherhood of NOD's " .. Utils.Random({ "Terrorist-Compound!", "Training-Site!", "Secret-Base!" }))
			Trigger.OnPlayerDiscovered(nod, function(_, discoverer)
				if discoverer == player and not player.IsObjectiveCompleted(contactnod) then
					if not nod.HasNoRequiredUnits() then
						Media.PlaySoundNotification(multi0 or multi1 or multi2 or multi3, "CameraSound")
						Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(2.4, 4.2)), function()
							Media.PlaySpeechNotification(multi0 or multi1 or multi2 or multi3, "KaneSpeechSound" .. Utils.RandomInteger(2, 3))
						end)
						Media.DisplayMessage("|Brotherhood-of-NOD Detected|", "[FirstContact]", nod.Color)
						player.MarkCompletedObjective(contactnod)
					end
				end
			end)
		end)
	end)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	if multi0.Faction == "allies" then
		Invocation0 = tostring(RandomUsaInvocation)
	elseif multi0.Faction == "england" or multi0.Faction == "greece" then
		Invocation0 = tostring(RandomEnglandInvocation)
	elseif multi0.Faction == "france" or multi0.Faction == "spain" then
		Invocation0 = tostring(RandomFranceInvocation)
	elseif multi0.Faction == "germany" then
		Invocation0 = tostring(RandomGermanyInvocation)
	elseif multi0.Faction == "soviet" then
		Invocation0 = tostring(RandomChineseInvocation)
	elseif multi0.Faction == "russia" then
		Invocation0 = tostring(RandomGermanyInvocation)
	elseif multi0.Faction == "ukraine" or multi0.Faction == "turkey" then
		Invocation0 = tostring(RandomUkraineInvocation)
	end
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	if multi1.Faction == "allies" then
		Invocation1 = tostring(RandomUsaInvocation)
	elseif multi1.Faction == "england" or multi1.Faction == "greece" then
		Invocation1 = tostring(RandomEnglandInvocation)
	elseif multi1.Faction == "france" or multi1.Faction == "spain" then
		Invocation1 = tostring(RandomFranceInvocation)
	elseif multi1.Faction == "germany" then
		Invocation1 = tostring(RandomGermanyInvocation)
	elseif multi1.Faction == "soviet" then
		Invocation1 = tostring(RandomChineseInvocation)
	elseif multi1.Faction == "russia" then
		Invocation1 = tostring(RandomGermanyInvocation)
	elseif multi1.Faction == "ukraine" or multi1.Faction == "turkey" then
		Invocation1 = tostring(RandomUkraineInvocation)
	end
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	if multi2.Faction == "allies" then
		Invocation2 = tostring(RandomUsaInvocation)
	elseif multi2.Faction == "england" or multi2.Faction == "greece" then
		Invocation2 = tostring(RandomEnglandInvocation)
	elseif multi2.Faction == "france" or multi2.Faction == "spain" then
		Invocation2 = tostring(RandomFranceInvocation)
	elseif multi2.Faction == "germany" then
		Invocation2 = tostring(RandomGermanyInvocation)
	elseif multi2.Faction == "soviet" then
		Invocation2 = tostring(RandomChineseInvocation)
	elseif multi2.Faction == "russia" then
		Invocation2 = tostring(RandomGermanyInvocation)
	elseif multi2.Faction == "ukraine" or multi2.Faction == "turkey" then
		Invocation2 = tostring(RandomUkraineInvocation)
	end
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	if multi3.Faction == "allies" then
		Invocation3 = tostring(RandomUsaInvocation)
	elseif multi3.Faction == "england" or multi3.Faction == "greece" then
		Invocation3 = tostring(RandomEnglandInvocation)
	elseif multi3.Faction == "france" or multi3.Faction == "spain" then
		Invocation3 = tostring(RandomFranceInvocation)
	elseif multi3.Faction == "germany" then
		Invocation3 = tostring(RandomGermanyInvocation)
	elseif multi3.Faction == "soviet" then
		Invocation3 = tostring(RandomChineseInvocation)
	elseif multi3.Faction == "russia" then
		Invocation3 = tostring(RandomGermanyInvocation)
	elseif multi3.Faction == "ukraine" or multi3.Faction == "turkey" then
		Invocation3 = tostring(RandomUkraineInvocation)
	end
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(12, 14)), function() 
		Utils.Do(players, function(player)
    	    	  	Media.DisplayMessage("[" .. player.Team .. "]", "|" .. player.Name .. "/Team|", player.Color)
		end)
    	    	if multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
      	      	else
      	      	      	Media.PlayMovieInRadar("earth.vqa", nil)
		end
	end)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(66, 88)), function() 
		if multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
		else
			if (multi0 or multi1 or multi2 or multi3).Faction == "allies" then
				Media.PlayMovieInRadar("m1a2video.vqa", nil)
      	      	      	elseif (multi0 or multi1 or multi2 or multi3).Faction == "england" or (multi0 or multi1 or multi2 or multi3).Faction == "greece" then
				Media.PlayMovieInRadar("m1a2video.vqa", nil)
			elseif (multi0 or multi1 or multi2 or multi3).Faction == "france" or (multi0 or multi1 or multi2 or multi3).Faction == "spain" then
				Media.PlayMovieInRadar("amx56video.vqa", nil)
      	      	      	elseif (multi0 or multi1 or multi2 or multi3).Faction == "germany" then
				Media.PlayMovieInRadar("leopard2video.vqa", nil)
      	      	      	elseif (multi0 or multi1 or multi2 or multi3).Faction == "soviet" then
				Media.PlayMovieInRadar("type99video.vqa", nil)
      	      	      	elseif (multi0 or multi1 or multi2 or multi3).Faction == "russia" then
				Media.PlayMovieInRadar("t90video.vqa", nil)
      	      	      	elseif (multi0 or multi1 or multi2 or multi3).Faction == "ukraine" or (multi0 or multi1 or multi2 or multi3).Faction == "turkey" then
				Media.PlayMovieInRadar("t72video.vqa", nil)
			end
		end
	end)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	Trigger.AfterDelay(0, function() 
		ConquestVictoryConditions0 = multi0.AddPrimaryObjective("Search & Destroy enemy units!")
	end)
	Trigger.AfterDelay(0, function()
		ConquestVictoryConditions1 = multi1.AddPrimaryObjective("Search & Destroy enemy units!")
	end)
	Trigger.AfterDelay(0, function()
		ConquestVictoryConditions2 = multi2.AddPrimaryObjective("Search & Destroy enemy units!")
	end)
	Trigger.AfterDelay(0, function()
		ConquestVictoryConditions3 = multi3.AddPrimaryObjective("Search & Destroy enemy units!")
	end)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function()
		BuildBarrack0 = multi0.AddSecondaryObjective("Build " .. Utils.Random({ "a barrack!", "an infantry-barrack!", "a conscript-barrack!" }))
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function()
		BuildBarrack1 = multi1.AddSecondaryObjective("Build " .. Utils.Random({ "a barrack!", "an infantry-barrack!", "a conscript-barrack!" }))
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function()
		BuildBarrack2 = multi2.AddSecondaryObjective("Build " .. Utils.Random({ "a barrack!", "an infantry-barrack!", "a conscript-barrack!" }))
	end)
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.6, 2.2)), function()
		BuildBarrack3 = multi3.AddSecondaryObjective("Build " .. Utils.Random({ "a barrack!", "an infantry-barrack!", "a conscript-barrack!" }))
	end)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.88, 4.44)), function()
		SurviveStartLeaderObjective0 = multi0.AddSecondaryObjective("The " .. tostring(Rank0) .. Utils.Random({ ", must be", ", need to be" }) .. " survive the battle!")
	end)                                                                                         
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.88, 4.44)), function()             
		SurviveStartLeaderObjective1 = multi1.AddSecondaryObjective("The " .. tostring(Rank1) .. Utils.Random({ ", must be", ", need to be" }) .. " survive the battle!")
	end)                                                                                         
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.88, 4.44)), function()             
		SurviveStartLeaderObjective2 = multi2.AddSecondaryObjective("The " .. tostring(Rank2) .. Utils.Random({ ", must be", ", need to be" }) .. " survive the battle!")
	end)                                                                                         
	Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(3.88, 4.44)), function()             
		SurviveStartLeaderObjective3 = multi3.AddSecondaryObjective("The " .. tostring(Rank3) .. Utils.Random({ ", must be", ", need to be" }) .. " survive the battle!")
	end)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	Trigger.OnObjectiveAdded(multi0 or multi1 or multi2 or multi3, function(p, id)
		Media.PlaySoundNotification(p, Utils.Random({ "TypewriterOfficerSound" .. Utils.RandomInteger(1, 7), "TypewriterSound" .. Utils.RandomInteger(1, 4) }))
		local ObjectiveDescription = p.GetObjectiveDescription(id)
		local ObjectiveType = string.lower(p.GetObjectiveType(id))
		Media.DisplayMessage(ObjectiveDescription, " -" .. tostring(Invocation0 or Invocation1 or Invocation2 or Invocation3) .. " " .. p.Name .. ", your [New " .. ObjectiveType .. " Objective]", p.Color)
	end)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	Trigger.OnObjectiveCompleted(multi0 or multi1 or multi2 or multi3, function(p, id)
		Media.PlaySoundNotification(p, Utils.Random({ "TypewriterOfficerSound" .. Utils.RandomInteger(1, 7), "TypewriterSound" .. Utils.RandomInteger(1, 4) }))
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.1, 1.2)), function()
			Media.PlaySpeechNotification(p, Utils.Random({ "ObjectiveMet", "ObjectiveReached" }))
		end)
		Media.DisplayMessage(p.GetObjectiveDescription(id), " -" .. tostring(Invocation0 or Invocation1 or Invocation2 or Invocation3) .. " " .. p.Name .. ", your [Objective Completed!]", Utils.Random({ HSLColor.LightGreen, HSLColor.Green, HSLColor.DarkGreen }))
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.3, 1.6)), function()
			if multi0.IsBot and multi1.IsBot and multi2.IsBot and multi3.IsBot then
			else
				if (p.Faction == "allies" or p.Faction == "england" or p.Faction == "france" or p.Faction == "germany" or p.Faction == "greece" or p.Faction == "spain") then
					Media.PlayMovieInRadar("allymorf.vqa", nil)
				elseif (p.Faction == "soviet" or p.Faction == "russia" or p.Faction == "ukraine" or p.Faction == "turkey") then
					Media.PlayMovieInRadar("sovtstar.vqa", nil)
				end
			end
		end)
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	end)
	Trigger.OnObjectiveFailed(multi0 or multi1 or multi2 or multi3, function(p, id)
		Media.PlaySoundNotification(p, Utils.Random({ "TypewriterOfficerSound" .. Utils.RandomInteger(1, 7), "TypewriterSound" .. Utils.RandomInteger(1, 4) }))
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.1, 1.2)), function()
			Media.PlaySpeechNotification(p, Utils.Random({ "ObjectiveNotMet", "ObjectiveNotReached" }))
		end)
		Media.DisplayMessage(p.GetObjectiveDescription(id), " -" .. tostring(Invocation0 or Invocation1 or Invocation2 or Invocation3) .. " " .. p.Name .. ", your [Objective Failed!]", Utils.Random({ HSLColor.OrangeRed, HSLColor.Salmon }))
-------------------------------------------------------------------------------------------------------------------------------------------------------------
	end)
	Trigger.OnPlayerWon(multi0 or multi1 or multi2 or multi3, function(p)
		Media.PlaySoundNotification(p, Utils.Random({ "TypewriterOfficerSound" .. Utils.RandomInteger(1, 7), "TypewriterSound" .. Utils.RandomInteger(1, 4) }))
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.2, 1.4)), function() 
			Media.PlaySpeechNotification(p, Utils.Random({ "MissionAccomplished", "Win" }))
		end)
		Media.DisplayMessage(" -" .. tostring(Invocation0 or Invocation1 or Invocation2 or Invocation3) .. " " .. p.Name, ", your [Mission Completed]", Utils.Random({ HSLColor.Red, HSLColor.DarkRed }))
----------------------------------------------------------------------------------------------------------------------------------------------------------------
	end)
	Trigger.OnPlayerLost(multi0 or multi1 or multi2 or multi3, function(p)
		Media.PlaySoundNotification(p, Utils.Random({ "TypewriterOfficerSound" .. Utils.RandomInteger(1, 7), "TypewriterSound" .. Utils.RandomInteger(1, 4) }))
		Trigger.AfterDelay(DateTime.Seconds(Utils.RandomInteger(1.2, 1.4)), function()
			Media.PlaySpeechNotification(p, Utils.Random({ "MissionFailed", "Lose" }))
		end)
		Media.DisplayMessage(" -" .. tostring(Invocation0 or Invocation1 or Invocation2 or Invocation3) .. " " .. p.Name, ", your [Mission Failed]", Utils.Random({ HSLColor.LimeGreen, HSLColor.LawnGreen }))
----------------------------------------------------------------------------------------------------------------------------------------------------------------
	end)
end

