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

ESC Key Cancelling Cinematic Sounds

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
So I have a cinematic rolling and there's a couple of sounds playing. When a player hits the ESC key, it fades the sound out for ALL players.

I thought I could get around this by playing the sound once locally for each player like shown below, but I get the same result.

  • Player Group - Pick every player in PlayersWatchingCinematic and do (Actions)
    • Loop - Actions
      • Set TempPlayer = (Picked player)
      • Custom script: if GetLocalPlayer() == udg_TempPlayer then
      • Sound - Play NewTournament <gen> at 65.00% volume, skipping the first 0.00 seconds
      • Custom script: endif
Does anyone know how to prevent the ESC key from cancelling sounds?
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Pressing escape in a cinematic transmission will end the cinematic transmission and stop the last played sound.

You can:
prevent the game from canceling cinematics at all by overwriting the cineamtic cancel trigger:
set bj_cineSceneBeingSkipped = CreateTrigger()
Doing so, esc should no longer end cinematic transmissions and stop sounds automatically. You can still do it manually by using the event 'player skips cinematic event' though.
This will have a permanent effect and can be done at map init.

overwrite the sound, so the game cannot access it anymore
set bj_cineSceneLastSound = null
Then the game won't stop the sound you played. Use it right after you play the sound.
 
Status
Not open for further replies.
Top