namreg 0 Posted November 3, 2007 I want to make a trigger to activate when a whole squad is wipped out. SQUAD: Compossed by squad leader, machine gunner, 3 riflemen and a medic. Squad leader's name sla01 machine gunner's name sla02 riflemen's names sla03, sla04, sla05 and medic's name sla06 ... at the beginning I used this code in the CONDITION field in the trigger: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">not(alive sla01) and not(alive sla02) and not(alive sla03) and not(alive sla04) and not(alive sla05) and not(alive sla06) But when I used many squads it gets very tiring to do this everytime, so I wondered if there's a way to make trigger detect if a whole group is dead. Maybe if I set this squad in a group like <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">sla01 setgroupid ["Eagle squad"] Share this post Link to post Share on other sites
fasad 1 Posted November 3, 2007 {alive _x} count (units groupName) will return the number of alive units in groupName. For a trigger condition, simply check for when this value == 0. Share this post Link to post Share on other sites
baddo 0 Posted November 3, 2007 For this an answer can also be found from the OFPEC Editors Depot, under functions. Even though you use ArmA, check also the OFP resources at OFPEC, they often are perfectly valid solutions for ArmA too. It's one of the first places you should check. Share this post Link to post Share on other sites
Op4 BuhBye 0 Posted November 4, 2007 Or you could just do it the easy way and group a trigger to the GL and set it to "whole group" not present. Share this post Link to post Share on other sites
Touch Off 10 Posted September 29, 2009 (edited) Your method isn't working for me, Op4 BuhBye. I have the trigger grouped to the team leader, whole group not present. Condition this, on activation hint "Team Blah are dead!" but it always hints me when the team leader is killed. EDIT. OK, so I need: groupname = group this Edited October 4, 2009 by Touch Off Share this post Link to post Share on other sites