Standardize usage of AddObjective in RA missions
This commit is contained in:
@@ -135,7 +135,7 @@ CreateEinstein = function()
|
|||||||
einstein = Actor.Create(EinsteinType, true, { Location = EinsteinSpawnPoint.Location, Owner = player })
|
einstein = Actor.Create(EinsteinType, true, { Location = EinsteinSpawnPoint.Location, Owner = player })
|
||||||
einstein.Scatter()
|
einstein.Scatter()
|
||||||
Trigger.OnKilled(einstein, RescueFailed)
|
Trigger.OnKilled(einstein, RescueFailed)
|
||||||
ExtractObjective = player.AddPrimaryObjective("Wait for the helicopter and extract Einstein.")
|
ExtractObjective = player.AddObjective("Wait for the helicopter and extract Einstein.")
|
||||||
Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(player, "TargetFreed") end)
|
Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(player, "TargetFreed") end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -193,10 +193,10 @@ WorldLoaded = function()
|
|||||||
Trigger.OnPlayerLost(player, MissionFailed)
|
Trigger.OnPlayerLost(player, MissionFailed)
|
||||||
Trigger.OnPlayerWon(player, MissionAccomplished)
|
Trigger.OnPlayerWon(player, MissionAccomplished)
|
||||||
|
|
||||||
FindEinsteinObjective = player.AddPrimaryObjective("Find Einstein.")
|
FindEinsteinObjective = player.AddObjective("Find Einstein.")
|
||||||
TanyaSurviveObjective = player.AddPrimaryObjective("Tanya must survive.")
|
TanyaSurviveObjective = player.AddObjective("Tanya must survive.")
|
||||||
EinsteinSurviveObjective = player.AddPrimaryObjective("Einstein must survive.")
|
EinsteinSurviveObjective = player.AddObjective("Einstein must survive.")
|
||||||
CivilProtectionObjective = player.AddSecondaryObjective("Protect all civilians.")
|
CivilProtectionObjective = player.AddObjective("Protect all civilians.", "Secondary", false)
|
||||||
|
|
||||||
RunInitialActivities()
|
RunInitialActivities()
|
||||||
|
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ SendTrucks = function()
|
|||||||
|
|
||||||
DateTime.TimeLimit = 0
|
DateTime.TimeLimit = 0
|
||||||
UserInterface.SetMissionText("")
|
UserInterface.SetMissionText("")
|
||||||
ConvoyObjective = player.AddPrimaryObjective("Escort the convoy.")
|
ConvoyObjective = player.AddObjective("Escort the convoy.")
|
||||||
|
|
||||||
Media.PlaySpeechNotification(player, "ConvoyApproaching")
|
Media.PlaySpeechNotification(player, "ConvoyApproaching")
|
||||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||||
@@ -234,10 +234,10 @@ WorldLoaded = function()
|
|||||||
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ussrObj = ussr.AddPrimaryObjective("Deny the allies!")
|
ussrObj = ussr.AddObjective("Deny the allies!")
|
||||||
|
|
||||||
SecureObjective = player.AddPrimaryObjective("Secure the convoy's path.")
|
SecureObjective = player.AddObjective("Secure the convoy's path.")
|
||||||
ConquestObjective = player.AddPrimaryObjective("Eliminate the entire soviet presence in this area.")
|
ConquestObjective = player.AddObjective("Eliminate the entire soviet presence in this area.")
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(allies, "MissionTimerInitialised") end)
|
Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(allies, "MissionTimerInitialised") end)
|
||||||
|
|
||||||
|
|||||||
@@ -119,11 +119,11 @@ InitObjectives = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
KillBridges = player.AddPrimaryObjective("Destroy all bridges.")
|
KillBridges = player.AddObjective("Destroy all bridges.")
|
||||||
TanyaSurvive = player.AddPrimaryObjective("Tanya must survive.")
|
TanyaSurvive = player.AddObjective("Tanya must survive.")
|
||||||
KillUSSR = player.AddSecondaryObjective("Destroy all Soviet oil pumps.")
|
KillUSSR = player.AddObjective("Destroy all Soviet oil pumps.", "Secondary", false)
|
||||||
FreePrisoners = player.AddSecondaryObjective("Free all Allied soldiers and keep them alive.")
|
FreePrisoners = player.AddObjective("Free all Allied soldiers and keep them alive.", "Secondary", false)
|
||||||
ussr.AddPrimaryObjective("Bridges must not be destroyed.")
|
ussr.AddObjective("Bridges must not be destroyed.")
|
||||||
|
|
||||||
Trigger.OnObjectiveCompleted(player, function(p, id)
|
Trigger.OnObjectiveCompleted(player, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
|
|||||||
@@ -183,11 +183,11 @@ InitObjectives = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
KillBridges = player.AddPrimaryObjective("Destroy all bridges.")
|
KillBridges = player.AddObjective("Destroy all bridges.")
|
||||||
TanyaSurvive = player.AddPrimaryObjective("Tanya must survive.")
|
TanyaSurvive = player.AddObjective("Tanya must survive.")
|
||||||
FindAllies = player.AddSecondaryObjective("Find our lost tanks.")
|
FindAllies = player.AddObjective("Find our lost tanks.", "Secondary", false)
|
||||||
FreePrisoners = player.AddSecondaryObjective("Free all Allied soldiers and keep them alive.")
|
FreePrisoners = player.AddObjective("Free all Allied soldiers and keep them alive.", "Secondary", false)
|
||||||
ussr.AddPrimaryObjective("Bridges must not be destroyed.")
|
ussr.AddObjective("Bridges must not be destroyed.")
|
||||||
|
|
||||||
Trigger.OnObjectiveCompleted(player, function(p, id)
|
Trigger.OnObjectiveCompleted(player, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
|
|||||||
@@ -143,8 +143,8 @@ InitObjectives = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
KillUSSR = player.AddPrimaryObjective("Destroy all Soviet units and buildings in this region.")
|
KillUSSR = player.AddObjective("Destroy all Soviet units and buildings in this region.")
|
||||||
DestroyConvoys = player.AddSecondaryObjective("Eliminate all passing Soviet convoys.")
|
DestroyConvoys = player.AddObjective("Eliminate all passing Soviet convoys.", "Secondary", false)
|
||||||
|
|
||||||
Trigger.OnObjectiveCompleted(player, function(p, id)
|
Trigger.OnObjectiveCompleted(player, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ SendWaterExtraction = function()
|
|||||||
Camera.Position = flare.CenterPosition
|
Camera.Position = flare.CenterPosition
|
||||||
|
|
||||||
WaterExtractionTran = Reinforcements.ReinforceWithTransport(greece, ExtractionTransport, nil, SpyEntryPath)[1]
|
WaterExtractionTran = Reinforcements.ReinforceWithTransport(greece, ExtractionTransport, nil, SpyEntryPath)[1]
|
||||||
ExtractObj = greece.AddPrimaryObjective("Get all your forces into the transport.")
|
ExtractObj = greece.AddObjective("Get all your forces into the transport.")
|
||||||
|
|
||||||
Trigger.OnKilled(WaterExtractionTran, function() ussr.MarkCompletedObjective(ussrObj) end)
|
Trigger.OnKilled(WaterExtractionTran, function() ussr.MarkCompletedObjective(ussrObj) end)
|
||||||
Trigger.OnAllRemovedFromWorld(greece.GetGroundAttackers(), function()
|
Trigger.OnAllRemovedFromWorld(greece.GetGroundAttackers(), function()
|
||||||
@@ -192,13 +192,13 @@ FreeTanya = function()
|
|||||||
Trigger.OnKilled(Tanya, function() ussr.MarkCompletedObjective(ussrObj) end)
|
Trigger.OnKilled(Tanya, function() ussr.MarkCompletedObjective(ussrObj) end)
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "tough" then
|
if Map.LobbyOption("difficulty") == "tough" then
|
||||||
KillSams = greece.AddPrimaryObjective("Destroy all four SAM Sites that block\nour reinforcements' helicopter.")
|
KillSams = greece.AddObjective("Destroy all four SAM Sites that block\nour reinforcements' helicopter.")
|
||||||
|
|
||||||
greece.MarkCompletedObjective(mainObj)
|
greece.MarkCompletedObjective(mainObj)
|
||||||
surviveObj = greece.AddPrimaryObjective("Tanya must not die!")
|
surviveObj = greece.AddObjective("Tanya must not die!")
|
||||||
Media.PlaySpeechNotification(greece, "TanyaRescued")
|
Media.PlaySpeechNotification(greece, "TanyaRescued")
|
||||||
else
|
else
|
||||||
KillSams = greece.AddPrimaryObjective("Destroy all four SAM sites that block\nthe extraction helicopter.")
|
KillSams = greece.AddObjective("Destroy all four SAM sites that block\nthe extraction helicopter.")
|
||||||
|
|
||||||
Media.PlaySpeechNotification(greece, "TargetFreed")
|
Media.PlaySpeechNotification(greece, "TargetFreed")
|
||||||
end
|
end
|
||||||
@@ -376,10 +376,10 @@ InitObjectives = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ussrObj = ussr.AddPrimaryObjective("Deny the Allies.")
|
ussrObj = ussr.AddObjective("Deny the Allies.")
|
||||||
mainObj = greece.AddPrimaryObjective("Rescue Tanya.")
|
mainObj = greece.AddObjective("Rescue Tanya.")
|
||||||
KillAll = greece.AddPrimaryObjective("Eliminate all Soviet units in this area.")
|
KillAll = greece.AddObjective("Eliminate all Soviet units in this area.")
|
||||||
infWarfactory = greece.AddSecondaryObjective("Infiltrate the Soviet warfactory.")
|
infWarfactory = greece.AddObjective("Infiltrate the Soviet warfactory.", "Secondary", false)
|
||||||
|
|
||||||
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ InfiltrateTechCenter = function()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
infiltrated = true
|
infiltrated = true
|
||||||
DestroySovietsObj = player.AddPrimaryObjective("Destroy all Soviet buildings and units in the area.")
|
DestroySovietsObj = player.AddObjective("Destroy all Soviet buildings and units in the area.")
|
||||||
player.MarkCompletedObjective(InfiltrateTechCenterObj)
|
player.MarkCompletedObjective(InfiltrateTechCenterObj)
|
||||||
|
|
||||||
local Proxy = Actor.Create("powerproxy.paratroopers", false, { Owner = ussr })
|
local Proxy = Actor.Create("powerproxy.paratroopers", false, { Owner = ussr })
|
||||||
@@ -198,8 +198,8 @@ WorldLoaded = function()
|
|||||||
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
InfiltrateTechCenterObj = player.AddPrimaryObjective("Infiltrate one of the Soviet tech centers with a spy.")
|
InfiltrateTechCenterObj = player.AddObjective("Infiltrate one of the Soviet tech centers with a spy.")
|
||||||
CaptureRadarDomeObj = player.AddSecondaryObjective("Capture the Radar Dome at the shore.")
|
CaptureRadarDomeObj = player.AddObjective("Capture the Radar Dome at the shore.", "Secondary", false)
|
||||||
|
|
||||||
Camera.Position = DefaultCameraPosition.CenterPosition
|
Camera.Position = DefaultCameraPosition.CenterPosition
|
||||||
|
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ InfiltrateTechCenter = function()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
infiltrated = true
|
infiltrated = true
|
||||||
DestroySovietsObj = player.AddPrimaryObjective("Destroy all Soviet buildings and units in the area.")
|
DestroySovietsObj = player.AddObjective("Destroy all Soviet buildings and units in the area.")
|
||||||
player.MarkCompletedObjective(InfiltrateTechCenterObj)
|
player.MarkCompletedObjective(InfiltrateTechCenterObj)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -202,8 +202,8 @@ WorldLoaded = function()
|
|||||||
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
InfiltrateTechCenterObj = player.AddPrimaryObjective("Infiltrate one of the Soviet tech centers with a spy.")
|
InfiltrateTechCenterObj = player.AddObjective("Infiltrate one of the Soviet tech centers with a spy.")
|
||||||
CaptureRadarDomeObj = player.AddSecondaryObjective("Capture the Radar Dome at the shore.")
|
CaptureRadarDomeObj = player.AddObjective("Capture the Radar Dome at the shore.", "Secondary", false)
|
||||||
|
|
||||||
Camera.Position = DefaultCameraPosition.CenterPosition
|
Camera.Position = DefaultCameraPosition.CenterPosition
|
||||||
|
|
||||||
|
|||||||
@@ -185,10 +185,10 @@ WorldLoaded = function()
|
|||||||
|
|
||||||
Camera.Position = DefaultCameraPosition.CenterPosition
|
Camera.Position = DefaultCameraPosition.CenterPosition
|
||||||
|
|
||||||
CaptureRadarDomeObj = greece.AddPrimaryObjective("Capture the Radar Dome.")
|
CaptureRadarDomeObj = greece.AddObjective("Capture the Radar Dome.")
|
||||||
DestroySubPens = greece.AddPrimaryObjective("Destroy all Soviet Sub Pens")
|
DestroySubPens = greece.AddObjective("Destroy all Soviet Sub Pens")
|
||||||
ClearSubActivity = greece.AddSecondaryObjective("Clear the area of all sub activity")
|
ClearSubActivity = greece.AddObjective("Clear the area of all sub activity", "Secondary", false)
|
||||||
BeatAllies = ussr.AddPrimaryObjective("Defeat the Allied forces.")
|
BeatAllies = ussr.AddObjective("Defeat the Allied forces.")
|
||||||
|
|
||||||
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
|
|||||||
@@ -119,10 +119,10 @@ WorldLoaded = function()
|
|||||||
ussr = Player.GetPlayer("USSR")
|
ussr = Player.GetPlayer("USSR")
|
||||||
germany = Player.GetPlayer("Germany")
|
germany = Player.GetPlayer("Germany")
|
||||||
|
|
||||||
DefendChronosphere = greece.AddPrimaryObjective("Defend the Chronosphere and the Tech Center\nat all costs.")
|
DefendChronosphere = greece.AddObjective("Defend the Chronosphere and the Tech Center\nat all costs.")
|
||||||
KeepBasePowered = greece.AddPrimaryObjective("The Chronosphere must have power when the\ntimer runs out.")
|
KeepBasePowered = greece.AddObjective("The Chronosphere must have power when the\ntimer runs out.")
|
||||||
EvacuateScientists = greece.AddSecondaryObjective("Evacuate all scientists from the island to\nthe west.")
|
EvacuateScientists = greece.AddObjective("Evacuate all scientists from the island to\nthe west.", "Secondary", false)
|
||||||
BeatAllies = ussr.AddPrimaryObjective("Defeat the Allied forces.")
|
BeatAllies = ussr.AddObjective("Defeat the Allied forces.")
|
||||||
|
|
||||||
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
|
|||||||
@@ -119,10 +119,10 @@ WorldLoaded = function()
|
|||||||
ussr = Player.GetPlayer("USSR")
|
ussr = Player.GetPlayer("USSR")
|
||||||
england = Player.GetPlayer("England")
|
england = Player.GetPlayer("England")
|
||||||
|
|
||||||
DefendChronosphere = greece.AddPrimaryObjective("Defend the Chronosphere and the Tech Center\nat all costs.")
|
DefendChronosphere = greece.AddObjective("Defend the Chronosphere and the Tech Center\nat all costs.")
|
||||||
KeepBasePowered = greece.AddPrimaryObjective("The Chronosphere must have power when the\ntimer runs out.")
|
KeepBasePowered = greece.AddObjective("The Chronosphere must have power when the\ntimer runs out.")
|
||||||
EvacuateScientists = greece.AddSecondaryObjective("Evacuate all scientists from the island to\nthe east.")
|
EvacuateScientists = greece.AddObjective("Evacuate all scientists from the island to\nthe east.", "Secondary", false)
|
||||||
BeatAllies = ussr.AddPrimaryObjective("Defeat the Allied forces.")
|
BeatAllies = ussr.AddObjective("Defeat the Allied forces.")
|
||||||
|
|
||||||
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ DiscoveredAlliedBase = function(actor, discoverer)
|
|||||||
|
|
||||||
--Need to delay this so we don't fail mission before obj added
|
--Need to delay this so we don't fail mission before obj added
|
||||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||||
SurviveObjective = allies.AddPrimaryObjective("Defend outpost until reinforcements arrive.")
|
SurviveObjective = allies.AddObjective("Defend outpost until reinforcements arrive.")
|
||||||
SetupTimeNotifications()
|
SetupTimeNotifications()
|
||||||
Trigger.OnAllRemovedFromWorld(AlliedBase, function()
|
Trigger.OnAllRemovedFromWorld(AlliedBase, function()
|
||||||
allies.MarkFailedObjective(SurviveObjective)
|
allies.MarkFailedObjective(SurviveObjective)
|
||||||
@@ -145,7 +145,7 @@ InitObjectives = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
DiscoverObjective = allies.AddPrimaryObjective("Find the outpost.")
|
DiscoverObjective = allies.AddObjective("Find the outpost.")
|
||||||
|
|
||||||
Utils.Do(AlliedBase, function(actor)
|
Utils.Do(AlliedBase, function(actor)
|
||||||
Trigger.OnEnteredProximityTrigger(actor.CenterPosition, WDist.FromCells(8), function(discoverer, id)
|
Trigger.OnEnteredProximityTrigger(actor.CenterPosition, WDist.FromCells(8), function(discoverer, id)
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ SetupTriggers = function()
|
|||||||
|
|
||||||
Trigger.OnAllKilledOrCaptured(Sams, function()
|
Trigger.OnAllKilledOrCaptured(Sams, function()
|
||||||
allies1.MarkCompletedObjective(objDestroySamSites)
|
allies1.MarkCompletedObjective(objDestroySamSites)
|
||||||
objExtractEinstein = allies1.AddPrimaryObjective("Wait for a helicopter at the LZ and extract Einstein.")
|
objExtractEinstein = allies1.AddObjective("Wait for a helicopter at the LZ and extract Einstein.")
|
||||||
Actor.Create("flare", true, { Owner = allies1, Location = ExtractionLZ.Location + CVec.New(1, -1) })
|
Actor.Create("flare", true, { Owner = allies1, Location = ExtractionLZ.Location + CVec.New(1, -1) })
|
||||||
Beacon.New(allies1, ExtractionLZ.CenterPosition)
|
Beacon.New(allies1, ExtractionLZ.CenterPosition)
|
||||||
Media.PlaySpeechNotification(allies1, "SignalFlareNorth")
|
Media.PlaySpeechNotification(allies1, "SignalFlareNorth")
|
||||||
@@ -271,7 +271,7 @@ SetupTriggers = function()
|
|||||||
ReassignActors(TownUnits, neutral, allies1)
|
ReassignActors(TownUnits, neutral, allies1)
|
||||||
Utils.Do(TownUnits, function(a) a.Stance = "Defend" end)
|
Utils.Do(TownUnits, function(a) a.Stance = "Defend" end)
|
||||||
allies1.MarkCompletedObjective(objFindEinstein)
|
allies1.MarkCompletedObjective(objFindEinstein)
|
||||||
objEinsteinSurvival = allies1.AddPrimaryObjective("Keep Einstein alive at all costs.")
|
objEinsteinSurvival = allies1.AddObjective("Keep Einstein alive at all costs.")
|
||||||
Trigger.OnKilled(Einstein, function()
|
Trigger.OnKilled(Einstein, function()
|
||||||
allies1.MarkFailedObjective(objEinsteinSurvival)
|
allies1.MarkFailedObjective(objEinsteinSurvival)
|
||||||
end)
|
end)
|
||||||
@@ -365,13 +365,13 @@ WorldLoaded = function()
|
|||||||
ReassignActors(Map.ActorsInWorld, allies, allies2)
|
ReassignActors(Map.ActorsInWorld, allies, allies2)
|
||||||
SpawnTanya()
|
SpawnTanya()
|
||||||
|
|
||||||
objTanyaMustSurvive = allies1.AddPrimaryObjective("Tanya must survive.")
|
objTanyaMustSurvive = allies1.AddObjective("Tanya must survive.")
|
||||||
objFindEinstein = allies1.AddPrimaryObjective("Find Einstein's crashed helicopter.")
|
objFindEinstein = allies1.AddObjective("Find Einstein's crashed helicopter.")
|
||||||
objDestroySamSites = allies1.AddPrimaryObjective("Destroy the SAM sites.")
|
objDestroySamSites = allies1.AddObjective("Destroy the SAM sites.")
|
||||||
|
|
||||||
objHoldPosition = allies2.AddPrimaryObjective("Hold your position and protect the base.")
|
objHoldPosition = allies2.AddObjective("Hold your position and protect the base.")
|
||||||
objLimitLosses = allies2.AddSecondaryObjective("Do not lose more than " .. DeathThreshold[Map.LobbyOption("difficulty")] .. " units.")
|
objLimitLosses = allies2.AddObjective("Do not lose more than " .. DeathThreshold[Map.LobbyOption("difficulty")] .. " units.", "Secondary", false)
|
||||||
objCutSovietPower = allies2.AddSecondaryObjective("Take out the Soviet power grid.")
|
objCutSovietPower = allies2.AddObjective("Take out the Soviet power grid.", "Secondary", false)
|
||||||
|
|
||||||
SetupTriggers()
|
SetupTriggers()
|
||||||
SetupSoviets()
|
SetupSoviets()
|
||||||
|
|||||||
@@ -331,9 +331,9 @@ WorldLoaded = function()
|
|||||||
UserInterface.SetMissionText(UnitsEvacuated .. "/" .. unitsEvacuatedThreshold .. " units evacuated.", TextColor)
|
UserInterface.SetMissionText(UnitsEvacuated .. "/" .. unitsEvacuatedThreshold .. " units evacuated.", TextColor)
|
||||||
Utils.Do(humans, function(player)
|
Utils.Do(humans, function(player)
|
||||||
if player then
|
if player then
|
||||||
evacuateUnits = player.AddPrimaryObjective("Evacuate " .. unitsEvacuatedThreshold .. " units.")
|
evacuateUnits = player.AddObjective("Evacuate " .. unitsEvacuatedThreshold .. " units.")
|
||||||
destroyAirbases = player.AddSecondaryObjective("Destroy the nearby Soviet airbases.")
|
destroyAirbases = player.AddObjective("Destroy the nearby Soviet airbases.", "Secondary", false)
|
||||||
evacuateMgg = player.AddSecondaryObjective("Evacuate at least one mobile gap generator.")
|
evacuateMgg = player.AddObjective("Evacuate at least one mobile gap generator.", "Secondary", false)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -345,7 +345,7 @@ WorldLoaded = function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
sovietObjective = soviets.AddPrimaryObjective("Eradicate all allied troops.")
|
sovietObjective = soviets.AddObjective("Eradicate all allied troops.")
|
||||||
|
|
||||||
if not allies2 or allies1.IsLocalPlayer then
|
if not allies2 or allies1.IsLocalPlayer then
|
||||||
Camera.Position = Allies1EntryPoint.CenterPosition
|
Camera.Position = Allies1EntryPoint.CenterPosition
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ reinforcementsHaveArrived = false
|
|||||||
LabInfiltrated = function()
|
LabInfiltrated = function()
|
||||||
Utils.Do(humans, function(player)
|
Utils.Do(humans, function(player)
|
||||||
if player then
|
if player then
|
||||||
secureLab = player.AddPrimaryObjective("Secure the laboratory by eliminating its guards.")
|
secureLab = player.AddObjective("Secure the laboratory by eliminating its guards.")
|
||||||
destroyBase = player.AddPrimaryObjective("Destroy the remaining Soviet presence.")
|
destroyBase = player.AddObjective("Destroy the remaining Soviet presence.")
|
||||||
player.MarkCompletedObjective(infiltrateLab)
|
player.MarkCompletedObjective(infiltrateLab)
|
||||||
Trigger.ClearAll(Lab)
|
Trigger.ClearAll(Lab)
|
||||||
Trigger.AfterDelay(0, function()
|
Trigger.AfterDelay(0, function()
|
||||||
@@ -173,7 +173,7 @@ end
|
|||||||
InsertSpies = function()
|
InsertSpies = function()
|
||||||
Utils.Do(humans, function(player)
|
Utils.Do(humans, function(player)
|
||||||
if player then
|
if player then
|
||||||
infiltrateLab = player.AddPrimaryObjective("Get our spy into the laboratory undetected.")
|
infiltrateLab = player.AddObjective("Get our spy into the laboratory undetected.")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -270,9 +270,9 @@ WorldLoaded = function()
|
|||||||
Media.PlaySpeechNotification(player, "MissionFailed")
|
Media.PlaySpeechNotification(player, "MissionFailed")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
sovietObjective = soviets.AddPrimaryObjective("Destroy the village.")
|
sovietObjective = soviets.AddObjective("Destroy the village.")
|
||||||
villageObjective = player.AddPrimaryObjective("Save the village.")
|
villageObjective = player.AddObjective("Save the village.")
|
||||||
beachheadObjective = player.AddPrimaryObjective("Get your MCV to the main island.")
|
beachheadObjective = player.AddObjective("Get your MCV to the main island.")
|
||||||
|
|
||||||
beachheadTrigger = false
|
beachheadTrigger = false
|
||||||
Trigger.OnExitedFootprint(BeachheadTrigger, function(a, id)
|
Trigger.OnExitedFootprint(BeachheadTrigger, function(a, id)
|
||||||
@@ -281,7 +281,7 @@ WorldLoaded = function()
|
|||||||
Trigger.RemoveFootprintTrigger(id)
|
Trigger.RemoveFootprintTrigger(id)
|
||||||
player.MarkCompletedObjective(beachheadObjective)
|
player.MarkCompletedObjective(beachheadObjective)
|
||||||
|
|
||||||
captureObjective = player.AddPrimaryObjective("Locate and capture the enemy's Air Force HQ.")
|
captureObjective = player.AddObjective("Locate and capture the enemy's Air Force HQ.")
|
||||||
|
|
||||||
if AirForceHQ.IsDead then
|
if AirForceHQ.IsDead then
|
||||||
player.MarkFailedObjective(captureObjective)
|
player.MarkFailedObjective(captureObjective)
|
||||||
|
|||||||
@@ -67,9 +67,9 @@ SetupAlliedBase = function()
|
|||||||
AlliedBaseHarv.Owner = player
|
AlliedBaseHarv.Owner = player
|
||||||
AlliedBaseHarv.FindResources()
|
AlliedBaseHarv.FindResources()
|
||||||
|
|
||||||
FindDemitri = player.AddPrimaryObjective("Find Dr. Demitri. He is likely hiding in the village\n to the far south.")
|
FindDemitri = player.AddObjective("Find Dr. Demitri. He is likely hiding in the village\n to the far south.")
|
||||||
InfiltrateRadarDome = player.AddPrimaryObjective("Reprogram the super tanks by sending a spy into\n the Soviet radar dome.")
|
InfiltrateRadarDome = player.AddObjective("Reprogram the super tanks by sending a spy into\n the Soviet radar dome.")
|
||||||
DefendOutpost = player.AddSecondaryObjective("Defend and repair our outpost.")
|
DefendOutpost = player.AddObjective("Defend and repair our outpost.", "Secondary", false)
|
||||||
player.MarkCompletedObjective(FindOutpost)
|
player.MarkCompletedObjective(FindOutpost)
|
||||||
|
|
||||||
-- Don't fail the Objective instantly
|
-- Don't fail the Objective instantly
|
||||||
@@ -207,7 +207,7 @@ CreateDemitri = function()
|
|||||||
demitri.Move(DemitriTriggerAreaCenter.Location)
|
demitri.Move(DemitriTriggerAreaCenter.Location)
|
||||||
|
|
||||||
Media.PlaySpeechNotification(player, "TargetFreed")
|
Media.PlaySpeechNotification(player, "TargetFreed")
|
||||||
EvacuateDemitri = player.AddPrimaryObjective("Evacuate Dr. Demitri with the helicopter waiting\n at our outpost.")
|
EvacuateDemitri = player.AddObjective("Evacuate Dr. Demitri with the helicopter waiting\n at our outpost.")
|
||||||
player.MarkCompletedObjective(FindDemitri)
|
player.MarkCompletedObjective(FindDemitri)
|
||||||
|
|
||||||
local flarepos = CPos.New(DemitriLZ.Location.X, DemitriLZ.Location.Y - 1)
|
local flarepos = CPos.New(DemitriLZ.Location.X, DemitriLZ.Location.Y - 1)
|
||||||
@@ -299,15 +299,15 @@ InitObjectives = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
EliminateSuperTanks = player.AddPrimaryObjective("Eliminate these super tanks.")
|
EliminateSuperTanks = player.AddObjective("Eliminate these super tanks.")
|
||||||
StealMoney = player.AddPrimaryObjective("Steal money from the nearby outpost with the Thief.")
|
StealMoney = player.AddObjective("Steal money from the nearby outpost with the Thief.")
|
||||||
CrossRiver = player.AddPrimaryObjective("Secure transport to the mainland.")
|
CrossRiver = player.AddObjective("Secure transport to the mainland.")
|
||||||
FindOutpost = player.AddPrimaryObjective("Find our outpost and start repairs on it.")
|
FindOutpost = player.AddObjective("Find our outpost and start repairs on it.")
|
||||||
RescueCivilians = player.AddSecondaryObjective("Evacuate all civilians from the hospital.")
|
RescueCivilians = player.AddObjective("Evacuate all civilians from the hospital.", "Secondary", false)
|
||||||
BadGuyObj = badguy.AddPrimaryObjective("Deny the destruction of the super tanks.")
|
BadGuyObj = badguy.AddObjective("Deny the destruction of the super tanks.")
|
||||||
USSRObj = ussr.AddPrimaryObjective("Deny the destruction of the super tanks.")
|
USSRObj = ussr.AddObjective("Deny the destruction of the super tanks.")
|
||||||
UkraineObj = ukraine.AddPrimaryObjective("Survive.")
|
UkraineObj = ukraine.AddObjective("Survive.")
|
||||||
TurkeyObj = turkey.AddPrimaryObjective("Destroy.")
|
TurkeyObj = turkey.AddObjective("Destroy.")
|
||||||
|
|
||||||
Trigger.OnObjectiveCompleted(player, function(p, id)
|
Trigger.OnObjectiveCompleted(player, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
|
|||||||
@@ -142,10 +142,10 @@ WorldLoaded = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
objDestroyAllTrucks = greece.AddPrimaryObjective("Prevent Soviet convoy trucks from escaping.")
|
objDestroyAllTrucks = greece.AddObjective("Prevent Soviet convoy trucks from escaping.")
|
||||||
objKillAll = greece.AddPrimaryObjective("Clear the sector of all Soviet presence.")
|
objKillAll = greece.AddObjective("Clear the sector of all Soviet presence.")
|
||||||
objRadarSpy = greece.AddSecondaryObjective("Infiltrate the Soviet Radar Dome to reveal truck \necape routes.")
|
objRadarSpy = greece.AddObjective("Infiltrate the Soviet Radar Dome to reveal truck \necape routes.", "Secondary", false)
|
||||||
ussrObj = ussr.AddPrimaryObjective("Deny the Allies.")
|
ussrObj = ussr.AddObjective("Deny the Allies.")
|
||||||
|
|
||||||
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
|
|||||||
@@ -463,11 +463,11 @@ WorldLoaded = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
ussrObj = ussr.AddPrimaryObjective("Defeat the Allies.")
|
ussrObj = ussr.AddObjective("Defeat the Allies.")
|
||||||
ExitBase = greece.AddPrimaryObjective("Reach the eastern exit of the facility.")
|
ExitBase = greece.AddObjective("Reach the eastern exit of the facility.")
|
||||||
FreeTanya = greece.AddPrimaryObjective("Free Tanya and keep her alive.")
|
FreeTanya = greece.AddObjective("Free Tanya and keep her alive.")
|
||||||
KillVIPs = greece.AddSecondaryObjective("Kill all Soviet officers and scientists.")
|
KillVIPs = greece.AddObjective("Kill all Soviet officers and scientists.", "Secondary", false)
|
||||||
StealTank = greece.AddSecondaryObjective("Steal a Soviet mammoth tank.")
|
StealTank = greece.AddObjective("Steal a Soviet mammoth tank.", "Secondary", false)
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Map.LobbyOption("difficulty") == "hard" then
|
||||||
NoCasualties = greece.AddPrimaryObjective("Do not lose a single soldier or civilian\nunder your command.")
|
NoCasualties = greece.AddPrimaryObjective("Do not lose a single soldier or civilian\nunder your command.")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ WorldLoaded = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
VillageRaidObjective = player.AddPrimaryObjective("Raze the village.")
|
VillageRaidObjective = player.AddObjective("Raze the village.")
|
||||||
|
|
||||||
Trigger.OnAllRemovedFromWorld(Airfields, function()
|
Trigger.OnAllRemovedFromWorld(Airfields, function()
|
||||||
player.MarkFailedObjective(VillageRaidObjective)
|
player.MarkFailedObjective(VillageRaidObjective)
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ WorldLoaded = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
CommandCenterIntact = player.AddPrimaryObjective("Protect the Command Center.")
|
CommandCenterIntact = player.AddObjective("Protect the Command Center.")
|
||||||
DestroyAllAllied = player.AddPrimaryObjective("Destroy all Allied units and structures.")
|
DestroyAllAllied = player.AddObjective("Destroy all Allied units and structures.")
|
||||||
|
|
||||||
Trigger.OnPlayerWon(player, function()
|
Trigger.OnPlayerWon(player, function()
|
||||||
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
||||||
|
|||||||
@@ -193,9 +193,9 @@ WorldLoaded = function()
|
|||||||
Trigger.OnPlayerLost(player, function()
|
Trigger.OnPlayerLost(player, function()
|
||||||
Media.PlaySpeechNotification(player, "Lose")
|
Media.PlaySpeechNotification(player, "Lose")
|
||||||
end)
|
end)
|
||||||
alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.")
|
alliedObjective = enemy.AddObjective("Destroy all Soviet troops.")
|
||||||
sovietObjective1 = player.AddPrimaryObjective("Protect the Command Center.")
|
sovietObjective1 = player.AddObjective("Protect the Command Center.")
|
||||||
sovietObjective2 = player.AddPrimaryObjective("Destroy all Allied units and structures.")
|
sovietObjective2 = player.AddObjective("Destroy all Allied units and structures.")
|
||||||
|
|
||||||
enemy.Resources = 2000
|
enemy.Resources = 2000
|
||||||
Trigger.AfterDelay(DateTime.Seconds(30), ProduceInfantry)
|
Trigger.AfterDelay(DateTime.Seconds(30), ProduceInfantry)
|
||||||
|
|||||||
@@ -352,10 +352,10 @@ WorldLoaded = function()
|
|||||||
Trigger.OnPlayerLost(player, function()
|
Trigger.OnPlayerLost(player, function()
|
||||||
Media.PlaySpeechNotification(player, "Lose")
|
Media.PlaySpeechNotification(player, "Lose")
|
||||||
end)
|
end)
|
||||||
alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.")
|
alliedObjective = enemy.AddObjective("Destroy all Soviet troops.")
|
||||||
sovietObjective1 = player.AddPrimaryObjective("Kill the enemy spy.")
|
sovietObjective1 = player.AddObjective("Kill the enemy spy.")
|
||||||
sovietObjective2 = player.AddSecondaryObjective("Clear the nearby farm for reinforcements.")
|
sovietObjective2 = player.AddObjective("Clear the nearby farm for reinforcements.", "Secondary", false)
|
||||||
sovietObjective3 = player.AddSecondaryObjective("Scavenge the civilian buildings for supplies.")
|
sovietObjective3 = player.AddObjective("Scavenge the civilian buildings for supplies.", "Secondary", false)
|
||||||
end
|
end
|
||||||
|
|
||||||
Trigger.OnKilled(TheSpy, function()
|
Trigger.OnKilled(TheSpy, function()
|
||||||
|
|||||||
@@ -142,9 +142,9 @@ WorldLoaded = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
KillAll = player.AddPrimaryObjective("Defeat the Allied forces.")
|
KillAll = player.AddObjective("Defeat the Allied forces.")
|
||||||
BeatUSSR = Greece.AddPrimaryObjective("Defeat the Soviet forces.")
|
BeatUSSR = Greece.AddObjective("Defeat the Soviet forces.")
|
||||||
KillRadar = player.AddSecondaryObjective("Destroy Allied Radar Dome to stop enemy\nreinforcements.")
|
KillRadar = player.AddObjective("Destroy Allied Radar Dome to stop enemy\nreinforcements.", "Secondary", false)
|
||||||
|
|
||||||
Trigger.OnPlayerLost(player, function()
|
Trigger.OnPlayerLost(player, function()
|
||||||
Media.PlaySpeechNotification(player, "Lose")
|
Media.PlaySpeechNotification(player, "Lose")
|
||||||
|
|||||||
@@ -127,9 +127,9 @@ WorldLoaded = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
KillAll = player.AddPrimaryObjective("Defeat the Allied forces.")
|
KillAll = player.AddObjective("Defeat the Allied forces.")
|
||||||
BeatUSSR = Greece.AddPrimaryObjective("Defeat the Soviet forces.")
|
BeatUSSR = Greece.AddObjective("Defeat the Soviet forces.")
|
||||||
KillRadar = player.AddSecondaryObjective("Destroy Allied Radar Dome to stop enemy\nreinforcements.")
|
KillRadar = player.AddObjective("Destroy Allied Radar Dome to stop enemy\nreinforcements.", "Secondary", false)
|
||||||
|
|
||||||
Trigger.OnPlayerLost(player, function()
|
Trigger.OnPlayerLost(player, function()
|
||||||
Media.PlaySpeechNotification(player, "Lose")
|
Media.PlaySpeechNotification(player, "Lose")
|
||||||
|
|||||||
@@ -197,9 +197,9 @@ WorldLoaded = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
CaptureObjective = player.AddPrimaryObjective("Capture the Radar Dome.")
|
CaptureObjective = player.AddObjective("Capture the Radar Dome.")
|
||||||
KillAll = player.AddPrimaryObjective("Defeat the Allied forces.")
|
KillAll = player.AddObjective("Defeat the Allied forces.")
|
||||||
BeatUSSR = GoodGuy.AddPrimaryObjective("Defeat the Soviet forces.")
|
BeatUSSR = GoodGuy.AddObjective("Defeat the Soviet forces.")
|
||||||
|
|
||||||
RunInitialActivities()
|
RunInitialActivities()
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ WorldLoaded = function()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
HoldObjective = player.AddPrimaryObjective("Defend the Radar Dome.")
|
HoldObjective = player.AddObjective("Defend the Radar Dome.")
|
||||||
player.MarkCompletedObjective(CaptureObjective)
|
player.MarkCompletedObjective(CaptureObjective)
|
||||||
Beacon.New(player, MCVDeploy.CenterPosition)
|
Beacon.New(player, MCVDeploy.CenterPosition)
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Map.LobbyOption("difficulty") == "easy" then
|
||||||
|
|||||||
@@ -145,10 +145,10 @@ WorldLoaded = function()
|
|||||||
Trigger.OnPlayerLost(player, function()
|
Trigger.OnPlayerLost(player, function()
|
||||||
Media.PlaySpeechNotification(player, "Lose")
|
Media.PlaySpeechNotification(player, "Lose")
|
||||||
end)
|
end)
|
||||||
alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.")
|
alliedObjective = enemy.AddObjective("Destroy all Soviet troops.")
|
||||||
sovietObjective = player.AddPrimaryObjective("Escort the Convoy.")
|
sovietObjective = player.AddObjective("Escort the Convoy.")
|
||||||
sovietObjective2 = player.AddSecondaryObjective("Destroy or capture the Allied radar dome to stop\nenemy reinforcements.")
|
sovietObjective2 = player.AddObjective("Destroy or capture the Allied radar dome to stop\nenemy reinforcements.", "Secondary", false)
|
||||||
SaveAllTrucks = player.AddSecondaryObjective("Keep all trucks alive.")
|
SaveAllTrucks = player.AddObjective("Keep all trucks alive.", "Secondary", false)
|
||||||
end
|
end
|
||||||
|
|
||||||
Tick = function()
|
Tick = function()
|
||||||
|
|||||||
@@ -110,10 +110,10 @@ WorldLoaded = function()
|
|||||||
Trigger.OnPlayerLost(player, function()
|
Trigger.OnPlayerLost(player, function()
|
||||||
Media.PlaySpeechNotification(player, "Lose")
|
Media.PlaySpeechNotification(player, "Lose")
|
||||||
end)
|
end)
|
||||||
alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.")
|
alliedObjective = enemy.AddObjective("Destroy all Soviet troops.")
|
||||||
sovietObjective = player.AddPrimaryObjective("Escort the Convoy.")
|
sovietObjective = player.AddObjective("Escort the Convoy.")
|
||||||
sovietObjective2 = player.AddSecondaryObjective("Destroy or capture the Allied radar dome to stop\nenemy reinforcements.")
|
sovietObjective2 = player.AddObjective("Destroy or capture the Allied radar dome to stop\nenemy reinforcements.", "Secondary", false)
|
||||||
SaveAllTrucks = player.AddSecondaryObjective("Keep all trucks alive.")
|
SaveAllTrucks = player.AddObjective("Keep all trucks alive.", "Secondary", false)
|
||||||
end
|
end
|
||||||
|
|
||||||
Tick = function()
|
Tick = function()
|
||||||
|
|||||||
@@ -293,13 +293,13 @@ WorldLoaded = function()
|
|||||||
Media.PlaySpeechNotification(player, "Lose")
|
Media.PlaySpeechNotification(player, "Lose")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
alliedObjective = enemy.AddPrimaryObjective("Destroy all Soviet troops.")
|
alliedObjective = enemy.AddObjective("Destroy all Soviet troops.")
|
||||||
sovietObjective1 = player.AddPrimaryObjective("Deactivate the security system.")
|
sovietObjective1 = player.AddObjective("Deactivate the security system.")
|
||||||
sovietObjective2 = player.AddPrimaryObjective("Rescue the engineers.")
|
sovietObjective2 = player.AddObjective("Rescue the engineers.")
|
||||||
sovietObjective3 = player.AddPrimaryObjective("Get the engineers to the coolant stations.")
|
sovietObjective3 = player.AddObjective("Get the engineers to the coolant stations.")
|
||||||
sovietObjective4 = player.AddPrimaryObjective("Use an Engineer to reprogram the security system.")
|
sovietObjective4 = player.AddObjective("Use an Engineer to reprogram the security system.")
|
||||||
sovietObjective5 = player.AddPrimaryObjective("Get an Engineer to the reactor core.")
|
sovietObjective5 = player.AddObjective("Get an Engineer to the reactor core.")
|
||||||
sovietObjective6 = player.AddSecondaryObjective("Free the dogs.")
|
sovietObjective6 = player.AddObjective("Free the dogs.", "Secondary", false)
|
||||||
end
|
end
|
||||||
|
|
||||||
Tick = function()
|
Tick = function()
|
||||||
|
|||||||
@@ -80,10 +80,10 @@ WorldLoaded = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
DestroyControlCenter = player.AddPrimaryObjective("Destroy the Control Center.")
|
DestroyControlCenter = player.AddObjective("Destroy the Control Center.")
|
||||||
KeepTanksAlive = player.AddPrimaryObjective("Your tank division must not be destroyed before\n the alloy facility is dealt with.")
|
KeepTanksAlive = player.AddObjective("Your tank division must not be destroyed before\n the alloy facility is dealt with.")
|
||||||
KeepVolkovAlive = player.AddPrimaryObjective("Keep Volkov Alive.")
|
KeepVolkovAlive = player.AddObjective("Keep Volkov Alive.")
|
||||||
KeepChitzkoiAlive = player.AddSecondaryObjective("Keep Chitzkoi Alive.")
|
KeepChitzkoiAlive = player.AddObjective("Keep Chitzkoi Alive.", "Secondary", false)
|
||||||
|
|
||||||
Trigger.OnPlayerWon(player, function()
|
Trigger.OnPlayerWon(player, function()
|
||||||
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
||||||
@@ -97,7 +97,7 @@ WorldLoaded = function()
|
|||||||
if not struc.IsDead then struc.Kill() end
|
if not struc.IsDead then struc.Kill() end
|
||||||
end)
|
end)
|
||||||
player.MarkCompletedObjective(DestroyControlCenter)
|
player.MarkCompletedObjective(DestroyControlCenter)
|
||||||
DestroyAlloyFacility = player.AddPrimaryObjective("Destroy the Alloy Facility.")
|
DestroyAlloyFacility = player.AddObjective("Destroy the Alloy Facility.")
|
||||||
Media.PlaySpeechNotification(player, "FirstObjectiveMet")
|
Media.PlaySpeechNotification(player, "FirstObjectiveMet")
|
||||||
Media.DisplayMessage("Excellent! The heavy turret control center is destroyed\n and now we can deal with the alloy facility.")
|
Media.DisplayMessage("Excellent! The heavy turret control center is destroyed\n and now we can deal with the alloy facility.")
|
||||||
end)
|
end)
|
||||||
@@ -105,7 +105,7 @@ WorldLoaded = function()
|
|||||||
Trigger.OnKilled(AlloyFacility, function()
|
Trigger.OnKilled(AlloyFacility, function()
|
||||||
if not player.IsObjectiveCompleted(DestroyControlCenter) then --Prevent a crash if the player somehow manage to cheese the mission and destroy
|
if not player.IsObjectiveCompleted(DestroyControlCenter) then --Prevent a crash if the player somehow manage to cheese the mission and destroy
|
||||||
player.MarkCompletedObjective(DestroyControlCenter) --the Alloy Facility without destroying the Control Center.
|
player.MarkCompletedObjective(DestroyControlCenter) --the Alloy Facility without destroying the Control Center.
|
||||||
DestroyAlloyFacility = player.AddPrimaryObjective("Destroy the Alloy Facility.")
|
DestroyAlloyFacility = player.AddObjective("Destroy the Alloy Facility.")
|
||||||
end
|
end
|
||||||
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
||||||
player.MarkCompletedObjective(DestroyAlloyFacility)
|
player.MarkCompletedObjective(DestroyAlloyFacility)
|
||||||
|
|||||||
@@ -277,9 +277,9 @@ TimerExpired = function()
|
|||||||
Reinforcements.Reinforce(allies, FrenchReinforcements, { SovietEntryPoint7.Location, Alliesbase.Location })
|
Reinforcements.Reinforce(allies, FrenchReinforcements, { SovietEntryPoint7.Location, Alliesbase.Location })
|
||||||
|
|
||||||
if DestroyObj then
|
if DestroyObj then
|
||||||
KillObj = allies.AddPrimaryObjective("Take control of French reinforcements and\nkill all remaining Soviet forces.")
|
KillObj = allies.AddObjective("Take control of French reinforcements and\nkill all remaining Soviet forces.")
|
||||||
else
|
else
|
||||||
DestroyObj = allies.AddPrimaryObjective("Take control of French reinforcements and\ndismantle the nearby Soviet base.")
|
DestroyObj = allies.AddObjective("Take control of French reinforcements and\ndismantle the nearby Soviet base.")
|
||||||
end
|
end
|
||||||
|
|
||||||
allies.MarkCompletedObjective(SurviveObj)
|
allies.MarkCompletedObjective(SurviveObj)
|
||||||
@@ -310,11 +310,11 @@ InitObjectives = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
SurviveObj = allies.AddPrimaryObjective("Enforce your position and hold-out the onslaught\nuntil reinforcements arrive.")
|
SurviveObj = allies.AddObjective("Enforce your position and hold-out the onslaught\nuntil reinforcements arrive.")
|
||||||
KillSams = allies.AddSecondaryObjective("Destroy the two SAM sites before reinforcements\narrive.")
|
KillSams = allies.AddObjective("Destroy the two SAM sites before reinforcements\narrive.", "Secondary", false)
|
||||||
Media.DisplayMessage("The Soviets are blocking our GPS. We need to investigate their new technology.")
|
Media.DisplayMessage("The Soviets are blocking our GPS. We need to investigate their new technology.")
|
||||||
CaptureAirfields = allies.AddSecondaryObjective("Capture and hold the Soviet airbase\nin the northeast.")
|
CaptureAirfields = allies.AddObjective("Capture and hold the Soviet airbase\nin the northeast.", "Secondary", false)
|
||||||
SovietObj = soviets.AddPrimaryObjective("Eliminate all Allied forces.")
|
SovietObj = soviets.AddObjective("Eliminate all Allied forces.")
|
||||||
|
|
||||||
Trigger.OnObjectiveCompleted(allies, function(p, id)
|
Trigger.OnObjectiveCompleted(allies, function(p, id)
|
||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
@@ -367,11 +367,11 @@ InitMission = function()
|
|||||||
Trigger.OnAllKilledOrCaptured(SovietBuildings, function()
|
Trigger.OnAllKilledOrCaptured(SovietBuildings, function()
|
||||||
if DestroyObj then
|
if DestroyObj then
|
||||||
if not soviets.HasNoRequiredUnits() then
|
if not soviets.HasNoRequiredUnits() then
|
||||||
KillObj = allies.AddPrimaryObjective("Kill all remaining Soviet forces.")
|
KillObj = allies.AddObjective("Kill all remaining Soviet forces.")
|
||||||
end
|
end
|
||||||
allies.MarkCompletedObjective(DestroyObj)
|
allies.MarkCompletedObjective(DestroyObj)
|
||||||
else
|
else
|
||||||
DestroyObj = allies.AddPrimaryObjective("Dismantle the nearby Soviet base.")
|
DestroyObj = allies.AddObjective("Dismantle the nearby Soviet base.")
|
||||||
allies.MarkCompletedObjective(DestroyObj)
|
allies.MarkCompletedObjective(DestroyObj)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ Tick = function()
|
|||||||
if DestroyObj then
|
if DestroyObj then
|
||||||
allies.MarkCompletedObjective(DestroyObj)
|
allies.MarkCompletedObjective(DestroyObj)
|
||||||
else
|
else
|
||||||
DestroyObj = allies.AddPrimaryObjective("Destroy all Soviet forces in the area.")
|
DestroyObj = allies.AddObjective("Destroy all Soviet forces in the area.")
|
||||||
allies.MarkCompletedObjective(DestroyObj)
|
allies.MarkCompletedObjective(DestroyObj)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -220,7 +220,7 @@ FinalAttack = function()
|
|||||||
Trigger.OnAllKilledOrCaptured(units, function()
|
Trigger.OnAllKilledOrCaptured(units, function()
|
||||||
if not DestroyObj then
|
if not DestroyObj then
|
||||||
Media.DisplayMessage("Excellent work Commander! We have reinforced our position enough to initiate a counter-attack.", "Incoming Report")
|
Media.DisplayMessage("Excellent work Commander! We have reinforced our position enough to initiate a counter-attack.", "Incoming Report")
|
||||||
DestroyObj = allies.AddPrimaryObjective("Destroy the remaining Soviet forces in the area.")
|
DestroyObj = allies.AddObjective("Destroy the remaining Soviet forces in the area.")
|
||||||
end
|
end
|
||||||
allies.MarkCompletedObjective(SurviveObj)
|
allies.MarkCompletedObjective(SurviveObj)
|
||||||
end)
|
end)
|
||||||
@@ -260,7 +260,7 @@ SetupBridges = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
Media.DisplayMessage("Commander! The Soviets destroyed the bridges to disable our reinforcements. Repair them for additional reinforcements.", "Incoming Report")
|
Media.DisplayMessage("Commander! The Soviets destroyed the bridges to disable our reinforcements. Repair them for additional reinforcements.", "Incoming Report")
|
||||||
RepairBridges = allies.AddSecondaryObjective("Repair the two southern bridges.")
|
RepairBridges = allies.AddObjective("Repair the two southern bridges.", "Secondary", false)
|
||||||
|
|
||||||
local bridgeA = Map.ActorsInCircle(BrokenBridge1.CenterPosition, WDist.FromCells(1), function(self) return self.Type == "bridge1" end)
|
local bridgeA = Map.ActorsInCircle(BrokenBridge1.CenterPosition, WDist.FromCells(1), function(self) return self.Type == "bridge1" end)
|
||||||
local bridgeB = Map.ActorsInCircle(BrokenBridge2.CenterPosition, WDist.FromCells(1), function(self) return self.Type == "bridge1" end)
|
local bridgeB = Map.ActorsInCircle(BrokenBridge2.CenterPosition, WDist.FromCells(1), function(self) return self.Type == "bridge1" end)
|
||||||
@@ -295,8 +295,8 @@ InitObjectives = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
SurviveObj = allies.AddPrimaryObjective("Enforce your position and hold-out the onslaught.")
|
SurviveObj = allies.AddObjective("Enforce your position and hold-out the onslaught.")
|
||||||
SovietObj = soviets.AddPrimaryObjective("Eliminate all Allied forces.")
|
SovietObj = soviets.AddObjective("Eliminate all Allied forces.")
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Seconds(15), function()
|
Trigger.AfterDelay(DateTime.Seconds(15), function()
|
||||||
SetupBridges()
|
SetupBridges()
|
||||||
|
|||||||
@@ -110,10 +110,10 @@ WorldLoaded = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
BringSupplyTruck = player.AddPrimaryObjective("Bring the supply truck to the waystation.")
|
BringSupplyTruck = player.AddObjective("Bring the supply truck to the waystation.")
|
||||||
ProtectWaystation = player.AddPrimaryObjective("The waystation must not be destroyed.")
|
ProtectWaystation = player.AddObjective("The waystation must not be destroyed.")
|
||||||
DestroyAAGuns = player.AddSecondaryObjective("Destroy all the AA Guns to enable air support.")
|
DestroyAAGuns = player.AddObjective("Destroy all the AA Guns to enable air support.", "Secondary", false)
|
||||||
PreventAlliedIncursions = player.AddSecondaryObjective("Find and destroy the bridge the allies are using\nto bring their reinforcements in the area.")
|
PreventAlliedIncursions = player.AddObjective("Find and destroy the bridge the allies are using\nto bring their reinforcements in the area.", "Secondary", false)
|
||||||
|
|
||||||
Trigger.OnPlayerWon(player, function()
|
Trigger.OnPlayerWon(player, function()
|
||||||
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
Media.PlaySpeechNotification(player, "MissionAccomplished")
|
||||||
|
|||||||
Reference in New Issue
Block a user