R3dBuLL 10 Posted June 12, 2009 Hi, I wanna make a mission where u defend a postion and enemy is attacking u and tries to overrun u. The mission will be over if only 30 % of their mans/vehicles are left. How to do that? Is that possible with a simple trigger? And how can I check if a whole group is still alive? Share this post Link to post Share on other sites
Bon 12 Posted June 13, 2009 Hi, try to place a trigger which area covers the whole map, and give it a name, lets say the name Enemies. It must activate on PRESENT OPFOR (respectively the enemy side), REPEATED. Thats it. Now when this Trigger is active, i.e. there are ALIVE enemy troops in its area, then you can access all alive enemy units with the array "list Enemies". Using the command "count" then you can count the enemies in this array. if((count list Enemies)<value) then{end the game...} Accessing all units of a group its almost the same, the array then is called "units group <Groupname>", where Groupname is typically the name you assigned to the particular groupleader. EDIT: BTW all that stuff you can find more or less in Mr-Murrays Editing Guide. Its always a good idea to check that first. Share this post Link to post Share on other sites
R3dBuLL 10 Posted June 13, 2009 (edited) The command "units group" and that thing with counting is what I was looking for ^^ I know mr murrays editing guide and I try to find the answer there first before searching in the internet. Anyway thanks a lot! Edited June 13, 2009 by R3dBuLL Share this post Link to post Share on other sites
yyccccc 10 Posted June 15, 2009 if((count list Enemies)<value) then{end the game...} I paste your code into on act. but it does not work. Share this post Link to post Share on other sites
Benny. 15 Posted June 15, 2009 (edited) I suggest you to use a countside with some math commands in the trigger condition. Exemple (this only works if units are already inside the trigger, just replace east by the side that you want): Activation: ((((east countSide thislist)/100)*30) <= 30) Couldn't test it yet as i don't have arma around but it shall works. Edited June 15, 2009 by Benny. Share this post Link to post Share on other sites
yyccccc 10 Posted June 15, 2009 Exemple (this only works if units are already inside the trigger, just replace east by the side that you want): Activation: ((((east countSide _thislist)/100)*30) <= 30) I try this code does not work, local variable in global space? Share this post Link to post Share on other sites
Benny. 15 Posted June 15, 2009 Sorry my bad, try with thislist instead of _thislist Share this post Link to post Share on other sites