Jump to content
Sign in to follow this  
CHFlanker

Count units

Recommended Posts

Can anyone tell me how to count the units in a group?

Share this post


Link to post
Share on other sites

Zoom in real close. biggrin.gif

No really zoom in, and take into consideration that tanks have 3 crew men, helos have 2, apc's have 2, and you can only have 12 units in a group so, you can only have 4 tanks in a group (4*3=12), 6 helos (6*2=12) and so on.

And also, when you use the group function and create an "Infantry Group", it put @ the very end, one sodier on top of another so you only actually see 11, but you can move that one away from the its ontop of and you will see both.

Share this post


Link to post
Share on other sites

Er... yes, sorry my question wasn't very precise!

I try to write a script that counts the units in one group to find out how many people have died.

Thank you anyway.

Share this post


Link to post
Share on other sites

The Units group command returns an array of all units in group. To count the elements of such an array, use the Count command, thus

Count (Units group)

returns the total number.

Spinor

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  

×