HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Polled Wait?

04-12-2005, 10:58 PM#1
Linera
Quote:
Q: What is a polled wait and how does it work?

A polled wait waits for all players to complete the wait. This means that if one player is lagging, it still waits the full amount of time. This stops the notorious 'wait bug.' Just know it's good to use

I was reading the TFT FAQ thread and it talked about a polled wait.

What is it talking about
04-12-2005, 11:26 PM#2
sweet5
Quote:
Originally Posted by Linera
I was reading the TFT FAQ thread and it talked about a polled wait.

What is it talking about

well if for some reason u need to add a wait to a trigger but you need all players paying attention or somthing, then u would use this so when somone is lagging, the wait doesnt finish and then the actions start/resume without him/her
04-13-2005, 04:10 AM#3
Linera
so its best to use polled wait instead of wait when ever I need a wait?

Where do I find polled wait?
04-13-2005, 05:01 AM#4
Azhag
I think it would depend on the situation. Say if a lot of stuff is happening, and you know it is going to lag a little, use the polled wait. Other then that use the normal wait. I would also like to know where this wait is.
04-13-2005, 07:45 AM#5
Guest
I guess it's made with: wait until (action)
04-13-2005, 08:21 AM#6
Raptor--
just always use a polled wait, better to be safe

and no badfurday, thats a completely different wait, polled wait is simply the action
wait (game-time)

in jass its
call PolledWait( real timeinseconds )

btw i believe polledwait was added because of a 'wait' bug which i don't remember what it is anymore but it occured with the normal wait
04-13-2005, 10:33 AM#7
Anitarf
The wait bug is simple: I have experienced it in my EoW map before I started using pooled waits everywhere. When a hero died, I had a normal wait before reviving him. However, if a player got disconnected at that time, the game got paused and everybody got that window "waiting for player", but the wait action kept on going, so when the game resumed, the hero revived way too soon. This could cause serious havoc in triggered spells and other similar things.

Well, now that we have pooled wait, there's no more trouble like that, because the wait pauses whenever the game pauses.
04-13-2005, 11:01 AM#8
Guest
Useful! Thx raptor and anitarf
04-13-2005, 02:13 PM#9
Linera
Thanks, I see I'll be using polled wait instead of wait.

What is game time equal to real time?
04-13-2005, 07:49 PM#10
Raptor--
Quote:
Originally Posted by Linera
Thanks, I see I'll be using polled wait instead of wait.

What is game time equal to real time?

ideally game-time is the exact same as real-time, but small slowdowns and such can occasionally make game-time slightly longer than real-time (usually less than a second difference though)
04-13-2005, 08:03 PM#11
Linera
Thank you Raptor for your help.
07-12-2005, 08:43 AM#12
Guest
Just to add on to this topic, Are there any drawbacks to using Polled Waits as in memory wise perhaps?
07-12-2005, 09:09 AM#13
Anitarf
Quote:
Originally Posted by applecat
Just to add on to this topic, Are there any drawbacks to using Polled Waits as in memory wise perhaps?
Memory wise? I'm not sure I understand what you mean, but I don't think there are any issues with polled waits. The only reason we have a normal wait is because it's a relic from the times before we had polled wait. Oh, and perhaps it could be useful in cinematic sequences when you want sound to play right despite the lag... but that's debatable as well, because even if you used a normal wait to keep the sound fluent (which it still wouldn't be if the lag occured at the wrong time, or if it just lasted longer than the sound), the action would still be interrupted... well, I would say don't bother with these considerations, just use polled waits all the way.