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

@@ -21,11 +21,9 @@ WorldLoaded = function()
gdi = Player.GetPlayer("GDI")
villagers = Player.GetPlayer("Villagers")
NodObjective1 = nod.AddPrimaryObjective("Kill Nikoomba")
NodObjective2 = nod.AddPrimaryObjective("Destroy the village")
NodObjective3 = nod.AddSecondaryObjective("Destroy all GDI troops in the area")
GDIObjective1 = gdi.AddPrimaryObjective("Eliminate all Nod forces")
Trigger.OnObjectiveAdded(nod, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
end)
Trigger.OnObjectiveCompleted(nod, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
end)
@@ -44,6 +42,11 @@ WorldLoaded = function()
end)
end)
NodObjective1 = nod.AddPrimaryObjective("Kill Nikoomba")
NodObjective2 = nod.AddPrimaryObjective("Destroy the village")
NodObjective3 = nod.AddSecondaryObjective("Destroy all GDI troops in the area")
GDIObjective1 = gdi.AddPrimaryObjective("Eliminate all Nod forces")
Trigger.OnKilled(Nikoomba, function()
nod.MarkCompletedObjective(NodObjective1)
Trigger.AfterDelay(Utils.Seconds(1), function()