Jump to content
Spriterfight

How to check last alive member of a group?

Recommended Posts

{alive _x} count units yourGroup == 1 // TRUE/FALSE

if ({alive _x} count units yourGroup == 1) then { lastUnit = units yourGroup select {alive _x} select 0 };  // lastUnit is the last unit

 

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, pierremgi said:

{alive _x} count units yourGroup == 1 // TRUE/FALSE

if ({alive _x} count units yourGroup == 1) then { lastUnit = units yourGroup select {alive _x} select 0 };  // lastUnit is the last unit

 

Thank you!

 

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

×