Fail mission if impossible to land at beach
This commit is contained in:
@@ -103,13 +103,25 @@ SendAlliedUnits = function()
|
|||||||
Media.PlaySpeechNotification(player, "ReinforcementsArrived")
|
Media.PlaySpeechNotification(player, "ReinforcementsArrived")
|
||||||
Utils.Do(AlliedUnits, function(table)
|
Utils.Do(AlliedUnits, function(table)
|
||||||
Trigger.AfterDelay(table.delay, function()
|
Trigger.AfterDelay(table.delay, function()
|
||||||
Reinforcements.Reinforce(player, table.types, { StartEntryPoint.Location, StartMovePoint.Location }, 18)
|
local units = Reinforcements.Reinforce(player, table.types, { StartEntryPoint.Location, StartMovePoint.Location }, 18)
|
||||||
|
|
||||||
|
Utils.Do(units, function(unit)
|
||||||
|
if unit.Type == "e6" then
|
||||||
|
Trigger.OnKilled(unit, LandingPossible)
|
||||||
|
end
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Seconds(1), function() InitialUnitsArrived = true end)
|
Trigger.AfterDelay(DateTime.Seconds(1), function() InitialUnitsArrived = true end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
LandingPossible = function()
|
||||||
|
if not beachReached and (USSRSpen.IsDead or Engineer.IsDead) and LstProduced < 1 then
|
||||||
|
player.MarkFailedObjective(CrossRiver)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
SuperTankDomeInfiltrated = function()
|
SuperTankDomeInfiltrated = function()
|
||||||
turkey.SetStance(player, "Ally")
|
turkey.SetStance(player, "Ally")
|
||||||
turkey.SetStance(neutral, "Ally")
|
turkey.SetStance(neutral, "Ally")
|
||||||
@@ -278,7 +290,7 @@ InitObjectives = function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
EliminateSuperTanks = player.AddPrimaryObjective("Eliminate these super tanks.")
|
EliminateSuperTanks = player.AddPrimaryObjective("Eliminate these super tanks.")
|
||||||
CrossRiver = player.AddPrimaryObjective("Find a way to transport your forces to the mainland.")
|
CrossRiver = player.AddPrimaryObjective("Secure transport to the mainland.")
|
||||||
FindOutpost = player.AddPrimaryObjective("Find our outpost and start repairs on it.")
|
FindOutpost = player.AddPrimaryObjective("Find our outpost and start repairs on it.")
|
||||||
RescueCivilians = player.AddSecondaryObjective("Evacuate all civilians from the hospital.")
|
RescueCivilians = player.AddSecondaryObjective("Evacuate all civilians from the hospital.")
|
||||||
BadGuyObj = badguy.AddPrimaryObjective("Deny the destruction of the super tanks.")
|
BadGuyObj = badguy.AddPrimaryObjective("Deny the destruction of the super tanks.")
|
||||||
@@ -400,6 +412,8 @@ InitTriggers = function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Trigger.OnKilled(USSRSpen, LandingPossible)
|
||||||
end
|
end
|
||||||
|
|
||||||
WorldLoaded = function()
|
WorldLoaded = function()
|
||||||
|
|||||||
Reference in New Issue
Block a user