function KillGame()
local secondary = Objectives.IsComplete(ScenarioInfo.M1S1) and
Objectives.IsComplete(ScenarioInfo.M2S1) and
Objectives.IsComplete(ScenarioInfo.M3S1) and
Objectives.IsComplete(ScenarioInfo.M4S1)
local bonus = Objectives.IsComplete(ScenarioInfo.M1B1) and
Objectives.IsComplete(ScenarioInfo.M1B2) and
Objectives.IsComplete(ScenarioInfo.M1B3) and
Objectives.IsComplete(ScenarioInfo.M2B1) and
Objectives.IsComplete(ScenarioInfo.M2B2) and
Objectives.IsComplete(ScenarioInfo.M4B1)
ScenarioFramework.EndOperation(ScenarioInfo.OpComplete, ScenarioInfo.OpComplete, secondary, bonus)
end
When I wont the missin even unfinished secondary objectives were marked as completed Cause of this: https://github.com/FAForever/NomadMissions/blob/master/NMCA_001/NMCA_001_script.lua#L183 It just markes all the objectives as completed
and this https://github.com/FAForever/NomadMissions/blob/master/NMCA_001/NMCA_001_script.lua#L227 which says that all are done with no condition testing if its actually true
Proper way of doing it is like this: