• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Another question, waits

Status
Not open for further replies.
Level 8
Joined
Aug 1, 2008
Messages
420
Im helping my friend with his map, but he used game-time waits in some of his stuff. Ive heard they caused de-syncs so im helping him turn them back into normal waits. but does anybody know: How many seconds is 1 game-time second or vise versa? does anybody actually know the conversion? because this would save me alot of time.
 
Well simply watch the function for wait (game time). It still uses Triggersleepaction but an additional timer to syncronize other players.
Code:
function PolledWait takes real duration returns nothing
    local timer t
    local real  timeRemaining

    if (duration > 0) then
        set t = CreateTimer()
        call TimerStart(t, duration, false, null)
        loop
            set timeRemaining = TimerGetRemaining(t)
            exitwhen timeRemaining <= 0

            // If we have a bit of time left, skip past 10% of the remaining
            // duration instead of checking every interval, to minimize the
            // polling on long waits.
            if (timeRemaining > bj_POLLED_WAIT_SKIP_THRESHOLD) then
                call TriggerSleepAction(0.1 * timeRemaining)
            else
                call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL)
            endif
        endloop
        call DestroyTimer(t)
    endif
endfunction
 
Sorry i dont understand jass. Tried to work out what it meant but couldnt find out :S

ok, if you say game-time waits are good, ill leave those how it is, thanks.
 
Status
Not open for further replies.
Back
Top