janchezs 1 Posted February 4, 2023 So Im making a big compaign and Iam already working on 3rd mission. So the question is how to make scenario end when only 30% BLUFOR is alive in trigger. Basicly the scenario is: sit in tank. Drive in trigger, after the player is in trigger 2 infantry squads enter the trigger after player. So how do I make *title* ? Share this post Link to post Share on other sites
Schatten 284 Posted February 4, 2023 @janchezs, try this condition (assuming the units are already inside the trigger): _unitsCount = count thisList; _unitsCountMin = thisTrigger getVariable ["unitsCountMin", -1]; if (_unitsCountMin < 0) then { _unitsCountMin = ceil (0.3 * _unitsCount); thisTrigger setVariable ["unitsCountMin", _unitsCountMin]; }; _unitsCount <= _unitsCountMin Share this post Link to post Share on other sites
janchezs 1 Posted February 4, 2023 21 minutes ago, Schatten said: @janchezs, try this condition (assuming the units are already inside the trigger): _unitsCount = count thisList; _unitsCountMin = thisTrigger getVariable ["unitsCountMin", -1]; if (_unitsCountMin < 0) then { _unitsCountMin = ceil (0.3 * _unitsCount); thisTrigger setVariable ["unitsCountMin", _unitsCountMin]; }; _unitsCount <= _unitsCountMin Hm. So I just use this code as trigger condition and set trigger to END1? I also think that the code is counting all the units, but I actually need to only count blufor, cuz they are defending and player is on the opfor site Share this post Link to post Share on other sites
janchezs 1 Posted February 4, 2023 Ive also tried "Siezed by opfor" in trigger settings, but I doesnt work the way I want because opfor has 2 BMP and 1 tank. Also around 60 people. And blufor has 3 bmp and like 50 people. So when all my units launch an assult I get instant win xd Share this post Link to post Share on other sites
Schatten 284 Posted February 4, 2023 2 minutes ago, janchezs said: So I just use this code as trigger condition and set trigger to END1? Correct. 3 minutes ago, janchezs said: I also think that the code is counting all the units, but I actually need to only count blufor Set that the trigger is activated by BLUFOR. Share this post Link to post Share on other sites
janchezs 1 Posted February 4, 2023 1 minute ago, Schatten said: Correct. Set that the trigger is activated by BLUFOR. thx. will try rn Share this post Link to post Share on other sites
janchezs 1 Posted February 4, 2023 51 minutes ago, Schatten said: @janchezs, try this condition (assuming the units are already inside the trigger): _unitsCount = count thisList; _unitsCountMin = thisTrigger getVariable ["unitsCountMin", -1]; if (_unitsCountMin < 0) then { _unitsCountMin = ceil (0.3 * _unitsCount); thisTrigger setVariable ["unitsCountMin", _unitsCountMin]; }; _unitsCount <= _unitsCountMin Oh thank u so much. It works! Share this post Link to post Share on other sites