From 91a0085bccb0e384e8ba8805e78ce47d19c0a536 Mon Sep 17 00:00:00 2001 From: maudlin27 <95254039+maudlin27@users.noreply.github.com> Date: Fri, 21 Jul 2023 19:46:36 +0100 Subject: [PATCH 1/2] Fix Aeon M2 objective SCCA_Coop_A02_script.lua Fixes a bug that can break Aeon mission 2 if the stealthed base is detected too soon --- SCCA_Coop_A02/SCCA_Coop_A02_script.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SCCA_Coop_A02/SCCA_Coop_A02_script.lua b/SCCA_Coop_A02/SCCA_Coop_A02_script.lua index 41bae8e2..54f865db 100644 --- a/SCCA_Coop_A02/SCCA_Coop_A02_script.lua +++ b/SCCA_Coop_A02/SCCA_Coop_A02_script.lua @@ -676,6 +676,10 @@ function M2AssignSecretBaseObjective() end end ) + --Sometimes this objective can trigger before the objective group is created since this is linked to when one of the naval base units is detected + while not(ScenarioInfo.M2ObjectiveGroup.AddObjective) do + WaitSeconds(1) + end ScenarioInfo.M2ObjectiveGroup:AddObjective(ScenarioInfo.M2P3Objective) ScenarioFramework.CreateTimerTrigger(M2CruiserWarning, 60) -- the cruiser will launch soon -- kill it From 99b4e4501459f55280cf68a173b95ba93cc5cc4a Mon Sep 17 00:00:00 2001 From: maudlin27 <95254039+maudlin27@users.noreply.github.com> Date: Sat, 22 Jul 2023 08:44:22 +0100 Subject: [PATCH 2/2] Remove redundancy in check Just check if there is a valid objective group (i.e. remove the check of whether that group has an AddObjective function) --- SCCA_Coop_A02/SCCA_Coop_A02_script.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SCCA_Coop_A02/SCCA_Coop_A02_script.lua b/SCCA_Coop_A02/SCCA_Coop_A02_script.lua index 54f865db..e616d1fa 100644 --- a/SCCA_Coop_A02/SCCA_Coop_A02_script.lua +++ b/SCCA_Coop_A02/SCCA_Coop_A02_script.lua @@ -677,7 +677,7 @@ function M2AssignSecretBaseObjective() end ) --Sometimes this objective can trigger before the objective group is created since this is linked to when one of the naval base units is detected - while not(ScenarioInfo.M2ObjectiveGroup.AddObjective) do + while not(ScenarioInfo.M2ObjectiveGroup) do WaitSeconds(1) end ScenarioInfo.M2ObjectiveGroup:AddObjective(ScenarioInfo.M2P3Objective)