Jump to content
Sign in to follow this  
FOX Dome

check if AI Group has less than 3 units

Recommended Posts

So hello ARMA gods

i rolled in to a Problem with Checking if a Counter attack is defeated by the players.

i basically need a condition that checks if a Group has 3 or less men, since i dont want that the players need to hunt down 100% of the 2 groups.

i Played with a few conditions like that one below around but had no success.

(count (units GroupofAI)) < 3

Curently i use this in the condition: (count (units Rapc2)) == 0 AND (count (units Rapc3)) == 0

and yeah i dont like to be forced to kill all of the 2 Groups to go ahead.

thx in advance!

Share this post


Link to post
Share on other sites

I'm sorry, I meant:

count (units group AI_GROUP_LEADER) < 3

But in case the group leader died, it'd return zero, which most likely isn't what you want. I'll try and come back to this later when I get some free time.

PS: What. I just woke up. :lol: This works:

if (count (units AI_GROUP) < 3) then { hint "HI" };

Where AI_GROUP is defined via...

AI_GROUP = group this

...if you're running that on the units init line.

Edited by rakowozz

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  

×