Gaffa 0 Posted July 17, 2009 Hi, I'm not sure where to go with this but basically I have a trigger that gets activated when the whole squad leaves the trigger. However, I only want the trigger to activate if the remaining members of the squad are still alive. If I just group the group to the trigger and set it not present, the trigger will activate if the group leaves the trigger or dies. But I don't want it to activate if the group die. the group leader of the squad I have alpha1=group this but I can't find a way of putting this in the condition for the trigger. I've tried: this and alive group alpha1 (doesn't work) this and alive alpha1 (code doesn't chuck up any errors but nothing happens) Any ideas? Thanks Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 17, 2009 I'm confused. Do you want the trigger to activate when all the remaining (alive) group members enter it? Edit: Or are you trying to get it to activate only when they leave the area, but are not dead? If that's the case, try this: this && {alive _X} count (units alpha1) > 0 Share this post Link to post Share on other sites
Gaffa 0 Posted July 17, 2009 Basically I want the trigger to activate when all remaining units from alpha1 have left the trigger. I'm creating a trigger over a camp with a group of 2 units who are POWS. Now when alpha1 (or all remaining units) leaves the trigger I want it to activate which will then complete a task. Sorry if its hard to understand I'm a bit tired lol... ---------- Post added at 09:24 PM ---------- Previous post was at 08:52 PM ---------- I don't think this works. :( If I shoot one of the two guys it activates the trigger? - If one unit dies and the other unit leaves the trigger, it should activate - If both units leave the trigger and are still alive it should activate - If both units die, the trigger shouldn't activate Share this post Link to post Share on other sites
Big Dawg KS 6 Posted July 20, 2009 {_X in thislist} count (units alpha1) <= 0 && {alive _X} count (units alpha1) > 0 Lol, my brain must not be working right today, it took me a while to figure out the proper logic, but this should do what you're looking for. Share this post Link to post Share on other sites
froggyluv 2136 Posted July 26, 2009 Ok my thread with a similar question got closed so I'll ask it here. Could someone spell out to me the proper syntax to define a group. Example: I have units T1,T2 and T3 and want to name them Group Alpha. Would that be: Group Alpha = (T1,T2,T3) and can I make the condition:!alive Group Alpha ? Share this post Link to post Share on other sites
cobra4v320 27 Posted July 26, 2009 (edited) To define a group you would do groupalpha=group this in the group leaders init field To check if a group is alive {alive _x} count units groupnamehere == 0 The 0 would mean everyone is dead. Edited July 26, 2009 by cobra4v320 Share this post Link to post Share on other sites
Taurus 20 Posted July 26, 2009 Ok my thread with a similar question got closed so I'll ask it here. Could someone spell out to me the proper syntax to define a group. Example: I have units T1,T2 and T3 and want to name them Group Alpha. Would that be: Group Alpha = (T1,T2,T3) and can I make the condition:!alive Group Alpha ? If you want specific named units to be members of a group you'd do this: [T1,T2,T3] join Alpha; Then use the examples mentioned in this thread. Share this post Link to post Share on other sites
froggyluv 2136 Posted July 26, 2009 Thanks guys. That was a question, probably elementary to many, but nonetheless one that I've had for a long time. Also, {alive _x} count units groupnamehere == 0 So if I wanted to insure that a trigger would fire when most of the enemy were dead in an area, I would use {alive _x} count units groupnamehere < 3 with 3 being the amount of enemy stragglers acceptable to continue on. Share this post Link to post Share on other sites
Taurus 20 Posted July 26, 2009 So if I wanted to insure that a trigger would fire when most of the enemy were dead in an area, I would use {alive _x} count units groupnamehere < 3 with 3 being the amount of enemy stragglers acceptable to continue on. Yepp. Share this post Link to post Share on other sites