🏆 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!
🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!
Timers would be the best alternatives for waits because waits has really an added time in it like for example if you typed, 0.01, it will be actually 0.02 or more while Timers are accurate and exact. As far as I know though.
Instead of a wait, one can use a countdown timer or a periodic timer and an array depending on what you need to do. I recommend looking at the spell database for some examples.
Timers would be the best alternatives for waits because waits has really an added time in it like for example if you typed, 0.01, it will be actually 0.02 or more while Timers are accurate and exact. As far as I know though.
Low wait times have one of the following times added to them: 0.1, 0,125, 0,150, 0,175, 0,2 even in single player. So a 0.01 second wait is at least 0.11 and max of 0.21. Higher wait times are more accurate but still recommended to avoid.
If you use GUI, I think it's ok to use waits in some cases, if you dont want to have it 100% perfect.
For example you just want to wait a short moment and then do action, so you just use wait 1 second for example.
And afterall you don't really care if it's 0.8 or 1.2 seconds, you just want it to be something like this.
Otherwise you would need to create a new trigger and put your actions there. (in GUI)
Also Wait - 0 seconds can be useful sometimes if you want to start a new thread.
Bad point of wait:
If someone is lagging online, the game pets paused, but the wait function is not. So it will continue counting.
Look at my tutorial things a guier should know.
The chapter on waits shows more info than listed here on why they are bad.
Then look at the chapter how to index to find the solution to not using waits.
Wait actions in WC3 all use TriggerSleepAction to suspend the trigger thread to be rescheduled at a later time. The problem is that the way it is rescheduled is not very good. It makes little guarantee was to what the actual wait time will be and I suspect it even delays by multiple round trip time in multiplayer.
Timers are much more accurate and reliable. They also appear to have sub frame resolution for some reason.
In SC2 Blizzard smartened up and used the same schedualer for waits as it did for timers. This is accurate to 1 game frame, the lowest resolvable time in SC2. In SC2 you can use wait actions all you like as long as you keep the thread amount reasonable and make sure the thread will not crash if waiting in a loop.
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.