🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!
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.