See the number of units in a region

How can i see the number of units in a region like this:
if number of units in “region” = 2
do
something

1 Like

Use a global variable and increase it for each unit in the region, like this:

Ok but how do i do like:
If count == 2
Do
Move one of the units in the region to another region

Move one of the units, like a random unit? If you want to move a random one of the units in the region to another region then you can set a variable to a random number between 1 and the number of units in the region, then decrease it for every unit in the region. If the variable reaches zero then the selected unit is the one chosen to be moved.


1 Like

wait i need to set the trigger as when unit enters region?

1 Like

and its moving all the units in the regionA to the regionB

1 Like

oh nevermind i fixed it

1 Like