Koni 1 Posted September 10, 2011 If you have a lot of triggers that need to be activated for one final trigger that's counting them off before completing a task, is there a shorter way of doing the condition instead of TriggerActivated triggername AND TriggerActivated triggername AND TriggerActivated triggername AND so on... ? Like Triggersactivated [trig1, trig2, trig3, trig4] I know that won't work, but can anything remotly similar be used ? Share this post Link to post Share on other sites
KC Grimes 74 Posted September 10, 2011 There really isn't anything wrong with just using the "long" version. If you reeaallyyy want to make it shorter, use && instead of AND. :P Hah. Share this post Link to post Share on other sites
Koni 1 Posted September 10, 2011 heh, is that as much as I can cut it down then :) Thanks for the reply Share this post Link to post Share on other sites
KC Grimes 74 Posted September 10, 2011 Well its either that or you can put.. [] spawn { waitUntil {triggerActivated triggername}; trg1 = true; }; in init.sqf or some other .sqf for each trigger you have, obviously changing triggername and trg1. If your triggers are in a linear order, it doesn't need to have [] spawn, just waituntil. And then make your condition... (trg1 = true) && (trg2 = true) && (trg3 = true) Or you may even get away with.. (trg1) && (trg2) && (trg3) Plenty of ways to go about doing anything in ArmA, which is why its so fun. But the way you started really is the simplest way. Share this post Link to post Share on other sites
Koni 1 Posted September 10, 2011 Interesting, but for what still has to be done to reduce it, I'll stick with the way I've always done it. Cheers :) Share this post Link to post Share on other sites
Muzzleflash 108 Posted September 10, 2011 (edited) What about this: _t = [trgA, trgB, trgC, trgD]; {triggerActivated _x} count _t == count _t EDIT: Forgot you can't have local variables in a trigger so either use a global one or perhaps this: [trgA, trgB, trgC, trgD] call {{triggerActivated _x} count _this == count _this} Edited September 10, 2011 by Muzzleflash Share this post Link to post Share on other sites