Jump to content
Sign in to follow this  
HazJ

Count AI Units Only

Recommended Posts

Hi, can anyone tell me how I can exclude human players from the below group count check?

_count = count units group player;

Would this work? :

if (!isPlayer player) then {_count = count units group player;};

Can't try the above code at the moment.

Any help is much appreciated!

Dirty Haz

Share this post


Link to post
Share on other sites

Never mind master got there before me.

you could just exclude the player from the count but may not work for multiple players in the group

_ count = count (units group player-[player]);

Edited by F2k Sel

Share this post


Link to post
Share on other sites

Thanks to both of you!

Dirty Haz

Share this post


Link to post
Share on other sites

Question on a related topic. There an easy way to count all alive AI in a game, regardless of what group they are in?

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  

×