Polished the mission objectives in allies06a

This commit is contained in:
abc013
2017-03-14 17:24:02 +01:00
parent db4554acec
commit 046427beea

View File

@@ -110,7 +110,6 @@ CaptureRadarDome = function()
end)
end
infiltrated = false
InfiltrateTechCenter = function()
Utils.Do(SovietTechLabs, function(a)
Trigger.OnInfiltrated(a, function()
@@ -127,9 +126,15 @@ InfiltrateTechCenter = function()
end)
Proxy.Destroy()
end)
Trigger.OnCapture(a, function()
if not infiltrated then
Media.DisplayMessage("Do not capture the tech centers! Infiltrate one with a spy.")
end
end)
end)
Trigger.OnAllKilled(SovietTechLabs, function()
Trigger.OnAllKilledOrCaptured(SovietTechLabs, function()
if not player.IsObjectiveCompleted(InfiltrateTechCenterObj) then
player.MarkFailedObjective(InfiltrateTechCenterObj)
end
@@ -140,6 +145,9 @@ InfiltrateRef = function()
Trigger.OnInfiltrated(Refinery, function()
player.MarkCompletedObjective(InfiltrateRefObj)
end)
Trigger.OnCapture(Refinery, function()
player.MarkCompletedObjective(InfiltrateRefObj)
end)
Trigger.OnKilled(Refinery, function()
if not player.IsObjectiveCompleted(InfiltrateRefObj) then
player.MarkFailedObjective(InfiltrateRefObj)
@@ -180,7 +188,7 @@ WorldLoaded = function()
Media.PlaySpeechNotification(player, "MissionAccomplished")
end)
InfiltrateTechCenterObj = player.AddPrimaryObjective("Infiltrate one of the Soviet tech centers.")
InfiltrateTechCenterObj = player.AddPrimaryObjective("Infiltrate one of the Soviet tech centers with a spy.")
CaptureRadarDomeObj = player.AddSecondaryObjective("Capture the Radar Dome at the shore.")
InfiltrateRefObj = player.AddSecondaryObjective("Infiltrate the Refinery for money.")