Correct nod-06c capture objective
This commit is contained in:
@@ -105,7 +105,7 @@ destroy-gdi-supporter-houses = Destroy the houses of the GDI supporters
|
|||||||
in the village.
|
in the village.
|
||||||
|
|
||||||
## nod06c
|
## nod06c
|
||||||
infiltrate-barracks-factory-conyard = Infiltrate the barracks, weapons factory and
|
capture-barracks-factory-conyard = Capture the barracks, weapons factory and
|
||||||
construction yard.
|
construction yard.
|
||||||
|
|
||||||
## nod07a
|
## nod07a
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ WorldLoaded = function()
|
|||||||
InitObjectives(Nod)
|
InitObjectives(Nod)
|
||||||
|
|
||||||
NodObjective1 = AddPrimaryObjective(Nod, "steal-nuclear-detonator")
|
NodObjective1 = AddPrimaryObjective(Nod, "steal-nuclear-detonator")
|
||||||
InfiltrateObjective = AddSecondaryObjective(Nod, "infiltrate-barracks-factory-conyard")
|
CaptureObjective = AddSecondaryObjective(Nod, "capture-barracks-factory-conyard")
|
||||||
|
|
||||||
InsertNodUnits()
|
InsertNodUnits()
|
||||||
|
|
||||||
@@ -111,18 +111,18 @@ WorldLoaded = function()
|
|||||||
Trigger.AfterDelay(ProductionDelay, ProdTriggerFunction)
|
Trigger.AfterDelay(ProductionDelay, ProdTriggerFunction)
|
||||||
|
|
||||||
Trigger.OnAnyKilled(BuildingsToCapture, function()
|
Trigger.OnAnyKilled(BuildingsToCapture, function()
|
||||||
if not Nod.IsObjectiveCompleted(InfiltrateObjective) then
|
if not Nod.IsObjectiveCompleted(CaptureObjective) then
|
||||||
Nod.MarkFailedObjective(InfiltrateObjective)
|
Nod.MarkFailedObjective(CaptureObjective)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
local captured = 0
|
||||||
Utils.Do(BuildingsToCapture, function(building)
|
Utils.Do(BuildingsToCapture, function(building)
|
||||||
local captured = 0
|
|
||||||
Trigger.OnCapture(building, function()
|
Trigger.OnCapture(building, function()
|
||||||
captured = captured + 1
|
captured = captured + 1
|
||||||
|
|
||||||
if captured == 3 then
|
if captured == 3 then
|
||||||
Nod.MarkCompletedObjective(InfiltrateObjective)
|
Nod.MarkCompletedObjective(CaptureObjective)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user