Added notifications for new objectives to scripted missions

Fixes #6692
This commit is contained in:
Oliver Brakmann
2014-10-06 18:01:24 +02:00
parent d288868ca6
commit 36477ae323
9 changed files with 102 additions and 69 deletions

View File

@@ -65,10 +65,9 @@ WorldLoaded = function()
player = Player.GetPlayer("GDI")
nod = Player.GetPlayer("Nod")
nodObjective = nod.AddPrimaryObjective("Destroy all GDI troops")
gdiObjective1 = player.AddPrimaryObjective("Defend the town of Białystok")
gdiObjective2 = player.AddPrimaryObjective("Eliminate all Nod forces in the area")
Trigger.OnObjectiveAdded(player, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
end)
Trigger.OnObjectiveCompleted(player, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
end)
@@ -94,6 +93,10 @@ WorldLoaded = function()
end)
end)
nodObjective = nod.AddPrimaryObjective("Destroy all GDI troops")
gdiObjective1 = player.AddPrimaryObjective("Defend the town of Bialystok")
gdiObjective2 = player.AddPrimaryObjective("Eliminate all Nod forces in the area")
Trigger.OnExitedFootprint(TownAttackTrigger, function(a, id)
if a.Owner == player then
Trigger.RemoveFootprintTrigger(id)