fatty86 10 Posted May 7, 2011 I'm trying to set up a trigger to fire when all BLUFOR units are within the trigger area. Here's what I've got: Trigger BLUFOR PRESENT, condition: ((count thisList) == ({alive _x && side _x == west} count allUnits)) The trouble I'm having is this. It appears count thisList is counting all units in a BLUFOR helicopter as one single unit. So, say I have 10 guys on the ground, and 3 in a helicopter. It's treating the three helicopter guys as one unit, so 10+1=11. However, the count allUnits is returning EVERY BLUFOR man still alive, which is the full 13. The difference is that count allUnits treats each guy - including those in the helicopter - as an individual unit. How do I get the two to see 'eye to eye' and count each unit the same? Share this post Link to post Share on other sites
demonized 20 Posted May 7, 2011 (edited) my brain is kindof fried now, but crew command also works on man units correctly returning 1, this is probably the key to get it to work. will look at this again with fresh eyes sometime tomorrow. Edit: cant figure out a way to acomplish this in trigger only atm. only workaround i see is using a script and manually add crew count foreach vehicles to list, but thats not what you are after. then again, a trigger is same as a waitUntil command so the difference is nothing afaik. Edited May 7, 2011 by Demonized added edit. Share this post Link to post Share on other sites
fatty86 10 Posted May 8, 2011 I'd settle for any other way to get the trigger to fire when all units of a given side are within its area. Share this post Link to post Share on other sites
f2k sel 164 Posted May 9, 2011 I'm sure there is a nice neat way of doing it but all I can come up with is this using two triggers. in a unit or game logic place ftrig=true Trigger One BLFOR Present Repeating cond ftrig on act many=0;{{many=many+1} forEach units _x } forEach thislist;ftrig=false on dea ftrig=true Trigger Two 0 0 size cond ((many) == ({alive _x && side _x == west} count allUnits)) on act hint format [" %1","all here"]; The first trigger counts all the units in the trigger even those in vehicles. The second trigger looks to see if the number found in trigger one matches the total of allunits. ftrig is just used to force trigger one to repeat, you could add some delay time so it's not checking every 0.5 seconds. Share this post Link to post Share on other sites
demonized 20 Posted May 9, 2011 yeah i did not get it to work in a single condition in single trigger either, using scripts or double triggers works... Share this post Link to post Share on other sites
shuko 59 Posted May 9, 2011 {alive _x && side _x == WEST && vehicle _x in thislist} count allunits == {alive _x && side _x == WEST} count allunits Share this post Link to post Share on other sites
quincy 10 Posted May 9, 2011 so simple lol put this in trigger and activate by radio alpha hintC format["There are %1 units on this map.", count allUnits]; Share this post Link to post Share on other sites
Rouby 1 Posted January 3, 2013 so simple lol put this in trigger and activate by radio alphahintC format["There are %1 units on this map.", count allUnits]; This does not solve the problem at all. Share this post Link to post Share on other sites
roguetrooper 2 Posted January 3, 2013 This does not solve the problem at all. Why don't you just put a vehicle with two crewmen and two single infantry men (including player) on the map and see if hintsilent format["There are %1 units on this map.", count allUnits]; returns 4? Share this post Link to post Share on other sites