Make warfactory infiltration a secondary objective
This commit is contained in:
@@ -84,7 +84,7 @@ GroupPatrol = function(units, waypoints, delay)
|
||||
end
|
||||
|
||||
Tick = function()
|
||||
if FollowTruk then
|
||||
if FollowTruk and not Truk.IsDead then
|
||||
Camera.Position = Truk.CenterPosition
|
||||
end
|
||||
|
||||
@@ -236,6 +236,12 @@ end
|
||||
InitTriggers = function()
|
||||
Trigger.OnInfiltrated(Warfactory, function()
|
||||
if greece.IsObjectiveCompleted(infWarfactory) then
|
||||
return
|
||||
elseif Truk.IsDead then
|
||||
if not greece.IsObjectiveCompleted(mainObj) then
|
||||
ussr.MarkCompletedObjective(ussrObj)
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
@@ -244,6 +250,14 @@ InitTriggers = function()
|
||||
WarfactoryInfiltrated()
|
||||
end)
|
||||
|
||||
Trigger.OnKilled(Truk, function()
|
||||
if not greece.IsObjectiveCompleted(infWarfactory) then
|
||||
greece.MarkFailedObjective(infWarfactory)
|
||||
elseif FollowTruk then
|
||||
ussr.MarkCompletedObjective(ussrObj)
|
||||
end
|
||||
end)
|
||||
|
||||
Trigger.OnInfiltrated(Prison, function()
|
||||
if greece.IsObjectiveCompleted(mainObj) then
|
||||
return
|
||||
@@ -354,7 +368,7 @@ InitObjectives = function()
|
||||
ussrObj = ussr.AddPrimaryObjective("Deny the Allies.")
|
||||
mainObj = greece.AddPrimaryObjective("Rescue Tanya.")
|
||||
KillAll = greece.AddPrimaryObjective("Eliminate all Soviet units in this area.")
|
||||
infWarfactory = greece.AddPrimaryObjective("Infiltrate the Soviet warfactory.")
|
||||
infWarfactory = greece.AddSecondaryObjective("Infiltrate the Soviet warfactory.")
|
||||
|
||||
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||
|
||||
Reference in New Issue
Block a user