Jump to content
Sign in to follow this  
TYsiEK

How to count alive units from group in script ?

Recommended Posts

I need to count alive units of individual group.

How can I do that ?

Share this post


Link to post
Share on other sites

nubmerofunits = count units grpname ?

I don't think dead units will be counted.. but I've been known to be wrong every now and then smile_o.gif

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"alive _x" count UNITS groupOne

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">"alive _x" count UNITS groupOne

THX so much ! It's working

If I could count like this:

_Group = _this select 0

_Gr = units _Group

player sideChat format ["There are still %1 units alive in %2",count _Gr,_Group]

Then command will count only first number of units in group. So If I could kill officer of the 12 units group, command will count it 12.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_gr = group (_this select 0)

player sideChat format ["There are still %1 units alive in %2",{alive _x} count units _gr,_gr]

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  

×