Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Event - Unit die
Condition - Triggering unit is in (Temp Group) == true
Action - Remove triggering unit from (Temp Group)
If (Number of units in (Temp Group)) == 0 then
Run Trigger (Your spawn trigger)
And then in your spawn trigger
- Add Last created unit group to (Temp Group)
Unit Group - Add (Last Created Unit) to Spawned_Units\\ Do this for every unit created. If you create multiple units, use the (Last Created Unit Group) function. After all that, use this function:
Set Spawned_Units_Integer = (Number of units in (Spawned_Units))
Now to check if all the units are dead:
Check Dead
Events
Unit - A unit dies
Conditions
((Dying Unit) is in (Spawned_Units)) Equal to True
Actions
Unit Group - Remove (Dying Unit) from Spawned_Units
Set Spawned_Units_Integer = ((Spawned_Units_Integer) - 1)
If (All Conditions are True) Then do (Then Actions) Else do (Else Actions)
If - Conditions
Spawned_Units_Integer Equal to 0
Then - Actions
Trigger - Run Unit Group Create <gen>\\ If you want to spawn the same units
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.