🏆 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!
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.