Jump to content
Sign in to follow this  
Bioz

Is is possible to give a name to an entire group? [Found nothing]

Recommended Posts

Guys I have a question. Is is possible to give a name to an entire group? because i want that a trigger gets activated when the entire group is dead. Thanks

Share this post


Link to post
Share on other sites

Leader's init field:

myBestGroupEver = group this;

Trigger condition:

{alive _x} count units myBestGroupEver == 0

Share this post


Link to post
Share on other sites

What if i have two different groups?

Share this post


Link to post
Share on other sites
{alive _x} count units myBestGroupEver + units dontLikeTheseGuys == 0

Share this post


Link to post
Share on other sites

As an additional note, putting myBestGroupEver = group this; in the group leader's init is sufficient for a SP mission or an AI controlled group. In a multiplayer mission where there could be multiple playable positions within that same group one needs to add this to the initline of each member of the group. By adding the line in each of the playable units in that group the check will still succeed even if the leader's slot is not picked by any players and is disabled for AI. If only the leader has that line and the slot is not filled in the startup screen the check would not work as intended.

Regards,

Sander

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×