Use global objective initialisation.

This commit is contained in:
Matthias Mailänder
2021-10-10 22:11:07 +02:00
committed by abcdefg30
parent d42edfc0b9
commit b9bfbfd5ac
53 changed files with 103 additions and 968 deletions

View File

@@ -92,27 +92,12 @@ WorldLoaded = function()
USSR = Player.GetPlayer("USSR")
England = Player.GetPlayer("England")
Trigger.OnObjectiveAdded(Spain, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
end)
InitObjectives(Spain)
EatSpain = BadGuy.AddObjective("For the Swarm!")
GasNests = Spain.AddObjective("Gas every ant nest.")
KillAll = Spain.AddObjective("Kill every ant lurking above ground.")
Trigger.OnObjectiveCompleted(Spain, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
end)
Trigger.OnObjectiveFailed(Spain, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
end)
Trigger.OnPlayerLost(Spain, function()
Media.PlaySpeechNotification(Spain, "Lose")
end)
Trigger.OnPlayerWon(Spain, function()
Media.PlaySpeechNotification(Spain, "Win")
end)
Camera.Position = DefaultCameraPosition.CenterPosition
Start()
GasAntNests()