Trigger not working (unit group)

MissKerrigan

Active Member
Reaction score
23
Hi,

I created a trigger which fires when a unit group is 0 but it isnt working

I made the condition:

if number of unit group is '0'
then run trigger level 2

nothing happens after the last unit of the unit group is killed
I really don't understand this, did I overlooked something?

MissKerrigan
 

Phubar

Ultra Cool Member
Reaction score
30
The condition must be "number of living units in unit group = 0"

Is this a part of a trigger? Or this is the whole trigger? Maybe there is a problem in the other part of the trigger if it's more than this. In that case can u post the whole trigger?
 

Phubar

Ultra Cool Member
Reaction score
30
I think it's a "if then else" function, a part of a bigger trigger.
 

X-maul

AKA: Demtrod
Reaction score
201
Melee Initialization is when the map just have finished loading. That will not be count always...

If you want to check if all the time, you will need to use a periodic event.

BUT - I would suggest you to use a wait for condition that uses your condition.
 

Dave312

Censored for your safe viewing
Reaction score
269
I personally would use the Unit Dies event since it is supposed to count when a unit dies.
 

MissKerrigan

Active Member
Reaction score
23
yes Dave, but when the last unit of the unit group dies, I'm not sure if the number of the unit group is '1' or '0' when the trigger must fire
 

X-maul

AKA: Demtrod
Reaction score
201
If you set the event to Unit Dies, and the condition to number of living units in unit group = 0.

If the last unit dies, there will be 0 living units in the unit group, and the condition will return true.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
It counts after. The unit group was 1, then one died(now the unit group is 0), then the event triggered, then the condition is checked(and since it's 0, it works).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top