From 4556a6ebb3d7ad6212c1789e948abd96e75c9523 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Sun, 31 May 2015 19:28:16 +0200 Subject: [PATCH] Adjust the objectives in allies02 --- mods/ra/maps/allies-02/allies02.lua | 35 +++---- mods/ra/maps/allies-02/map.yaml | 148 ++++++++++++++-------------- 2 files changed, 92 insertions(+), 91 deletions(-) diff --git a/mods/ra/maps/allies-02/allies02.lua b/mods/ra/maps/allies-02/allies02.lua index 392e332133..1ccf47a9d0 100644 --- a/mods/ra/maps/allies-02/allies02.lua +++ b/mods/ra/maps/allies-02/allies02.lua @@ -7,11 +7,9 @@ JeepPath = { ReinforcementsEntryPoint.Location, ReinforcementsRallyPoint.Locatio TruckReinforcements = { "truk", "truk", "truk" } TruckPath = { TruckEntryPoint.Location, TruckRallyPoint.Location } -TimerTicks = DateTime.Minutes(10) +PathGuards = { PathGuard1, PathGuard2, PathGuard3, PathGuard4, PathGuard5, PathGuard6, PathGuard7, PathGuard8, PathGuard9, PathGuard10, PathGuard11, PathGuard12, PathGuard13, PathGuard14, PathGuard15 } -SendConstructionVehicleReinforcements = function() - local mcv = Reinforcements.Reinforce(player, ConstructionVehicleReinforcements, ConstructionVehiclePath)[1] -end +TimerTicks = DateTime.Minutes(10) SendJeepReinforcements = function() Media.PlaySpeechNotification(player, "ReinforcementsArrived") @@ -20,14 +18,8 @@ end RunInitialActivities = function() Harvester.FindResources() -end -MissionAccomplished = function() - Media.PlaySpeechNotification(player, "MissionAccomplished") -end - -MissionFailed = function() - Media.PlaySpeechNotification(player, "MissionFailed") + Trigger.OnAllKilled(PathGuards, SendTrucks) end ticked = TimerTicks @@ -35,12 +27,11 @@ Tick = function() ussr.Resources = ussr.Resources - (0.01 * ussr.ResourceCapacity / 25) if ussr.HasNoRequiredUnits() then - SendTrucks() player.MarkCompletedObjective(ConquestObjective) end if player.HasNoRequiredUnits() then - player.MarkFailedObjective(ConquestObjective) + ussr.MarkCompletedObjective(ussrObj) end if ticked > 0 then @@ -69,8 +60,11 @@ ConvoyOnSite = false SendTrucks = function() if not ConvoyOnSite then ConvoyOnSite = true + ticked = 0 ConvoyObjective = player.AddPrimaryObjective("Escort the convoy.") + player.MarkCompletedObjective(SecureObjective) + Media.PlaySpeechNotification(player, "ConvoyApproaching") Trigger.AfterDelay(DateTime.Seconds(3), function() ConvoyUnharmed = true @@ -124,16 +118,23 @@ WorldLoaded = function() Trigger.OnObjectiveFailed(player, function(p, id) Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed") end) - Trigger.OnPlayerLost(player, MissionFailed) - Trigger.OnPlayerWon(player, MissionAccomplished) + Trigger.OnPlayerLost(player, function() + Media.PlaySpeechNotification(player, "MissionFailed") + end) + Trigger.OnPlayerWon(player, function() + Media.PlaySpeechNotification(player, "MissionAccomplished") + end) - ConquestObjective = player.AddPrimaryObjective("Secure the area.") + ussrObj = ussr.AddPrimaryObjective("Deny the allies!") + + SecureObjective = player.AddPrimaryObjective("Secure the convoy's path.") + ConquestObjective = player.AddPrimaryObjective("Eliminate the entire soviet presence in this area.") Trigger.AfterDelay(DateTime.Seconds(1), function() Media.PlaySpeechNotification(allies, "MissionTimerInitialised") end) RunInitialActivities() - SendConstructionVehicleReinforcements() + Reinforcements.Reinforce(player, ConstructionVehicleReinforcements, ConstructionVehiclePath) Trigger.AfterDelay(DateTime.Seconds(5), SendJeepReinforcements) Trigger.AfterDelay(DateTime.Seconds(10), SendJeepReinforcements) diff --git a/mods/ra/maps/allies-02/map.yaml b/mods/ra/maps/allies-02/map.yaml index b270c96ca8..3818599f5f 100644 --- a/mods/ra/maps/allies-02/map.yaml +++ b/mods/ra/maps/allies-02/map.yaml @@ -401,11 +401,6 @@ Actors: Owner: USSR Facing: 160 SubCell: 3 - Actor106: e1 - Location: 50,72 - Owner: USSR - Facing: 160 - SubCell: 4 Actor107: e1 Location: 73,60 Owner: USSR @@ -421,31 +416,6 @@ Actors: Owner: USSR Facing: 64 SubCell: 0 - Actor110: e1 - Location: 49,58 - Owner: USSR - Facing: 192 - SubCell: 0 - Actor111: e1 - Location: 51,58 - Owner: USSR - Facing: 32 - SubCell: 1 - Actor112: e1 - Location: 60,78 - Owner: USSR - Facing: 192 - SubCell: 4 - Actor113: e2 - Location: 62,79 - Owner: USSR - Facing: 160 - SubCell: 4 - Actor114: e1 - Location: 57,82 - Owner: USSR - Facing: 160 - SubCell: 1 Actor115: e1 Location: 60,64 Owner: USSR @@ -456,11 +426,6 @@ Actors: Owner: USSR Facing: 96 SubCell: 0 - Actor117: e1 - Location: 48,72 - Owner: USSR - Facing: 96 - SubCell: 0 Actor118: e1 Location: 57,69 Owner: USSR @@ -511,45 +476,6 @@ Actors: Owner: USSR Facing: 96 SubCell: 4 - Actor128: e1 - Location: 50,46 - Owner: USSR - Facing: 32 - SubCell: 1 - Actor129: e1 - Location: 49,47 - Owner: USSR - Facing: 64 - SubCell: 0 - Actor130: e2 - Location: 49,49 - Owner: USSR - Facing: 160 - SubCell: 1 - Actor131: e2 - Location: 47,46 - Owner: USSR - Facing: 96 - SubCell: 3 - Actor132: e2 - Location: 48,63 - Owner: USSR - SubCell: 1 - Actor133: e1 - Location: 49,63 - Owner: USSR - Facing: 96 - SubCell: 2 - Actor134: e1 - Location: 74,81 - Owner: USSR - Facing: 64 - SubCell: 3 - Actor135: e2 - Location: 75,83 - Owner: USSR - Facing: 96 - SubCell: 0 Actor136: e2 Location: 69,66 Owner: USSR @@ -669,6 +595,80 @@ Actors: Owner: USSR Health: 50 Facing: 160 + PathGuard1: e1 + Location: 50,72 + Owner: USSR + Facing: 160 + SubCell: 4 + PathGuard2: e1 + Location: 49,58 + Owner: USSR + Facing: 192 + SubCell: 0 + PathGuard3: e1 + Location: 51,58 + Owner: USSR + Facing: 32 + SubCell: 1 + PathGuard4: e1 + Location: 60,78 + Owner: USSR + Facing: 192 + SubCell: 4 + PathGuard5: e2 + Location: 62,79 + Owner: USSR + Facing: 160 + SubCell: 4 + PathGuard6: e1 + Location: 48,72 + Owner: USSR + Facing: 96 + SubCell: 0 + PathGuard7: e1 + Location: 50,46 + Owner: USSR + Facing: 32 + SubCell: 1 + PathGuard8: e1 + Location: 49,47 + Owner: USSR + Facing: 64 + SubCell: 0 + PathGuard9: e2 + Location: 49,49 + Owner: USSR + Facing: 160 + SubCell: 1 + PathGuard10: e2 + Location: 47,46 + Owner: USSR + Facing: 96 + SubCell: 3 + PathGuard11: e2 + Location: 48,63 + Owner: USSR + SubCell: 1 + PathGuard12: e1 + Location: 49,63 + Owner: USSR + Facing: 96 + SubCell: 2 + PathGuard13: e1 + Location: 74,81 + Owner: USSR + Facing: 64 + SubCell: 3 + PathGuard14: e2 + Location: 75,83 + Owner: USSR + Facing: 96 + SubCell: 0 + PathGuard15: e1 + Location: 57,82 + Owner: USSR + Facing: 160 + SubCell: 1 TruckEntryPoint: waypoint Location: 49,44 Owner: Neutral