count units in region

andrei009

Member
Reaction score
1
How can I check how many enemys are alive in area ?
I tried Number of units in (Units in myarea<gen> owned by Player 12 (Brown) but after I kill all the units there number of units doesn't change (it change only when I spawn enemys, but never decrease)
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Units that are dead will still be considered units until they decay or are removed with the Unit - Remove action. Your current method should work.
 

Solu9

You can change this now in User CP.
Reaction score
216
Add a condition to your pick unit function, "picked unit equal to alive".
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
You can add an If/Then/Else to your Pick Every Unit action, or replace the Units in Region Owned by Player with Units in Region Matching Condition and use an And condition to check for living units as well.

By the way, you're leaking a group variable there.
 

BcBoy

Active Member
Reaction score
6
You maybe can use a trigger that decrease the number everytime a unit of a certain type and/or owner dies within the region.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top