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

How do I make cinematic transmissions unskippable?

Status
Not open for further replies.
Level 13
Joined
May 10, 2009
Messages
868
Every time you send a transmission, it calls a BJ function that is responsible for skipping it. call TryInitCinematicBehaviorBJ()

It's quite simple, it creates a new trigger (once) which is assigned to a global variable. Then that function adds an event (Press ESC) and actions to it. All you have to do is just disable that trigger, and no one will be able to skip any transmission anymore.

See:
JASS:
function TryInitCinematicBehaviorBJ takes nothing returns nothing
    local integer index

    if (bj_cineSceneBeingSkipped == null) then
        set bj_cineSceneBeingSkipped = CreateTrigger()
        set index = 0
        loop
            call TriggerRegisterPlayerEvent(bj_cineSceneBeingSkipped, Player(index), EVENT_PLAYER_END_CINEMATIC)
            set index = index + 1
            exitwhen index == bj_MAX_PLAYERS
        endloop
        call TriggerAddAction(bj_cineSceneBeingSkipped, function CancelCineSceneBJ)
    endif
endfunction

This is just an example on how to prevent it from being executed. I will forcefully execute that BJ function, and disable its trigger when my map initializes:

  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- SOME STUFF HERE --------
      • Custom script: call TryInitCinematicBehaviorBJ()
      • Custom script: call DisableTrigger(bj_cineSceneBeingSkipped)
      • -------- SOME OTHER STUFF THERE --------
Whenever you feel like re-enabling such thing, you just need to call this:

  • Custom script: call EnableTrigger(bj_cineSceneBeingSkipped)
There you go.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,255
For multiplayer maps it is highly recommended to allow cinematics to be skipped if enough players press ESC. Watching the same cinematic dozens of times gets boring and annoying, especially if everyone has already seen it, and greatly effects replay ability.
 
Status
Not open for further replies.
Top