• 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.

[Trigger] Is wait from transmission exactly equal as normal wait?

Status
Not open for further replies.
Level 12
Joined
Mar 26, 2005
Messages
790
If I have something like this


A:Issue order unit Y to go to region Y
Send transmission to (playerx) and WAIT (standart 5 sec)
Issue order X to go to region X


IT is equal as if i use DONT WAIT, and add 5 sec wait below?

Or are there some mini details? (wait is not exact, i want to know if this transmission wait is non exact too)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
I imagine it's inaccurate. For reference, here is the script involved:

JASS:
function WaitTransmissionDuration takes sound soundHandle, integer timeType, real timeVal returns nothing
    if (timeType == bj_TIMETYPE_SET) then
        // If we have a static duration wait, just perform the wait.
        call TriggerSleepAction(timeVal)

    elseif (soundHandle == null) then
        // If the sound does not exist, perform a default length wait.
        call TriggerSleepAction(bj_NOTHING_SOUND_DURATION)

    elseif (timeType == bj_TIMETYPE_SUB) then
        // If the transmission is cutting off the sound, wait for the sound
        // to be mostly finished.
        call WaitForSoundBJ(soundHandle, timeVal)

    elseif (timeType == bj_TIMETYPE_ADD) then
        // If the transmission is extending beyond the sound's length, wait
        // for it to finish, and then wait the additional time.
        call WaitForSoundBJ(soundHandle, 0)
        call TriggerSleepAction(timeVal)

    else
        // Unrecognized timeType - ignore.
    endif
endfunction

Those WaitForSoundBJs call TriggerWaitForSound, which is a native I have no experience with.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
Wait is exact, but Wait (game-time) is not exact.

But PurplePoot just gave the JASS version of what you posted and added that it shows that it probably means it's not accurate (Don't ask me what makes it show that it's not accurate, because I don't know JASS either). Either way: It's probably not accurate.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Wait is exact, but Wait (game-time) is not exact.

But PurplePoot just gave the JASS version of what you posted and added that it shows that it probably means it's not accurate (Don't ask me what makes it show that it's not accurate, because I don't know JASS either). Either way: It's probably not accurate.

You got it vise-versa.
Polled wait ( wait Game time) is more accurate than Triggersleepaction ( wait).
But neither is accurate enough :D

You can test Waitforsound yourself but staring a timer, waiting for a sound and than checking how much time has passed.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
No, it's not. This is the direct description from the Trigger Editor:


Wait
The duration of this wait is specified in real-time seconds.

Wait (Game-Time)
The duration of this wait is specified in game-time seconds. This is a polled wait, so it may last slightly longer then requested.
 
Status
Not open for further replies.
Top