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

wth with polled wait?

Status
Not open for further replies.
Level 4
Joined
Aug 4, 2004
Messages
60
The minimum wait we can get with polled wait is around 0.25-0.3s this I know. But even a 0.75 or 1.00 etc. waits still last longer than requested (for small waits it's about 0.25s). And the annoying thing is the extra delay of this @#$% wait does not stay the same even when the wait is constant (in loops for example).

Some spells require exact wait, but for multi-instanceability purpose the periodic event is unusable (needs 2++ triggers for a spell - and big problems arise with 2 casters of the same spell)

Can somebody have a solution for this?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Umm... If you are talking about JASS, I had the same problem. Perhaps it happens in triggers as well. I noticed this huge bug in JASS and it annoyed me greatly. I had to lower the value I was decreasing with the loop. Hmm, I don't know how to solve this if it happens in triggers as well. Just sharing a thought.
 
Level 4
Joined
Aug 4, 2004
Messages
60
which is the Jass function you used? Well, what I mean is that there is a way to make a loop not using the PolledWait function, instead using the periodic event. Periodic events are exact waits, but doing this in GUI will cause the spell to be in-multi-instanceable (lol is this a correct word). And do it in Jass will cause the trigger much harder to implement and understand.
 
Level 4
Joined
Aug 4, 2004
Messages
60
For looping purpose only:

Make 2 separate function.
The first registers the event (start spell effect blahblah)

The first call the second trigger (initially off)

The second trigger registers a periodical event (let's say - every 0.1 second of game time)

The second is used as an alternate looping method. So, we don't have to deal with the bug in polledwait.

Makes things complicated and cause further issues but works.
 
Status
Not open for further replies.
Top