avibird 1 141 Posted December 30, 2023 I have been using this code in a trigger to end some of my mission when all IND and OPFOR units are dead in a AO. The code does not work anymore. The mission ends when either fraction has no alive units in the area. The code did work when both fraction have no units alive. I don't know if any commands have changed with any updates. here is my code in Two triggers Trigger.init Variable name c1 Text End Game Ind All Dead Trigger Transformation size A 20000 B 1000 C -1 Trigger Activiation Type None Activation Independent Activation Type Not present Trigger expression Condition call{this} On Activation call{c1UnitsDead = true; } Trigger.init Variable name c2 Text End Game Opfor All Dead Trigger Transformation size A 20000 B 1000 C -1 Trigger Activiation Type None Activation Opfpr Activation Type Not present Trigger expression Condition call{this} On Activation call{c2UnitsDead = true; } Trigger.init Variable name Task13_Succeeded Text Eliminate all hostile forces in the AO Trigger Transformation size A 0 B 0 C-1 Trigger Activiation Type None Activation None Trigger expression Condition call{ c1unitsdead && c2unitsdead } On Activation call{["Task13","SUCCEEDED"] call BIS_fnc_tasksetstate; "END1" call BIS_fnc_endMissionServer;} The mission ends when either IND units are dead or OPfor units dead. it used to work when all IND and Opfor units were dead. now if only one side is dead. how DO I fix this Avibird. Share this post Link to post Share on other sites
Gunter Severloh 3950 Posted December 31, 2023 Quote Condition call{this} On Activation call{c1UnitsDead = true; } condition --------------------> this On activation --------------> c1UnitsDead = true; Quote Condition call{this} On Activation call{c2UnitsDead = true; } Condition ----------------> this On activation -----------> C2Unitsdead = true; Quote Condition call{ c1unitsdead && c2unitsdead } On Activation call{["Task13","SUCCEEDED"] call BIS_fnc_tasksetstate; "END1" call BIS_fnc_endMissionServer;} Condition -----------------> c1unitsdead && c2unitsdead On Activation ------------> [ ] call BIS_fnc_endmission; Share this post Link to post Share on other sites
avibird 1 141 Posted December 31, 2023 Hey Gunter did something change because this was working for years but not now. I will try to insert your code to the triggers and see if it works as intended. Share this post Link to post Share on other sites
avibird 1 141 Posted December 31, 2023 Hey Gunter thanks works again. I don't understand why it stopped working after all this time. The old code worked fine for years SMH. Share this post Link to post Share on other sites
Gunter Severloh 3950 Posted December 31, 2023 Welcome, its because of the extra brackets, sometimes its best to type the code in then to copy and paste. I forget the reason why but i think either copying and pasting triggers with code in them adds the extra brackets, or when the scenario is reloaded with the new copy, it adds the brackets and the call at the beginning. Share this post Link to post Share on other sites