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!
How do I create a trigger that checks every 1 second how many Heroes are in the Region, and if the number of heroes drops to 1, then gives the Victory.
In general the trigger editor does exactly what you want it to do with the words you used. Literally try doing the steps you just wrote in the above post.
Events
Time - Every 1.00 seconds of game-time
Conditions
Actions
Set TempGroup = (Units in YOUR REGION <gen> matching (((Matching unit) is a hero) equal to true))
If (All conditions are true) then do (Then actions) else do (Else actions)
If - Conditions
(Number of units in TempGroup) less than or equal to 1
Then - Actions
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Game - Victory (Owner of (Picked Unit))
Else - Actions
Custom script: call DestroyGroup(udg_TempGroup) //Change the name to match your group variable but keep the udg_ prefix. This line cleans a leak; see the thread I linked below for an explanation
How do I create a trigger that checks every 1 second how many Heroes are in the Region, and if the number of heroes drops to 1, then gives the Victory.
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.