Transmission duration lower than expected

Level 6
Joined
Jul 3, 2006
Messages
102
I am creating a cinematic with quite a lot of transmissions, some of them have a lot of text and I want them to stay on screen a long time for the player to read.
What I find is that no matter how many seconds I use in the call to TransmissionFromUnitWithNameBJ, the text stays on screen for a couple seconds at best.

An example of my code:
JASS:
call TransmissionFromUnitWithNameBJ(bj_FORCE_ALL_PLAYERS , unit, "Name" , null , "<Quite the long text>" , 0 , 20, true)
call TransmissionFromUnitWithNameBJ(bj_FORCE_ALL_PLAYERS , unit2, "Name2" , null , "<Quite the long text 2>" , 0 , 15, true)
etc...

I would expect each message to last as long as 20 or 15 seconds but ingame it lasts much less, like 3-4 seconds.

Edit: Never mind, found the issue is the use of 0 instead of 1 (bj_TIMETYPE_SET) in the call.
 
Last edited:
If I convert something like this to custom text I see a few differences
  • Cinematic - Send transmission to (All players) from Footman 0000 <gen> named Footman: Play No sound and display Text 1 2.. Modify duration: Set to 10.00 seconds and Wait
JASS:
call TransmissionFromUnitWithNameBJ( GetPlayersAll(), gg_unit_hfoo_0000, "TRIGSTR_003", null, "TRIGSTR_004", bj_TIMETYPE_SET, 10.00, true )

The key thing being the modify duration type to Set so you can imput the exact amount of time you want it to display
 
That was fast! Well, I noticed in blizzard.j that they do a default wait when soundHandle is null which was easy to miss:

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
 
Back
Top