• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Quick question about Waits

Status
Not open for further replies.
Level 8
Joined
Jul 17, 2004
Messages
283
We all know Waits tend to be inaccurate, but if I use this Wait in a trigger, will the Wait be the same length each time while playing on Battle.net?

  • Wait 1.00 seconds
  • -------- Actions --------
  • Wait 1.00 seconds
  • -------- Actions --------
  • Wait 1.00 seconds
  • -------- Actions --------
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
it should be different, cause of how is wait implemented. If your wait only waits for 1.00 seconds but by 0.99999 second mark your game runs other trigger or maybe some rendering, that takes more than 0.00001 seconds, which most of things do, your Wait will already be longer than 1.00 seconds. Timers are a lot better, but one can argue they may also be inaccurate, but not so much as wait(0. second timer will still take at least 1 iteration in game logic to execute which means your current running function must end before the function attached to the timer can run)
 
Status
Not open for further replies.
Top