Multiplayer - Vote to skip cutscene causing dialogue to disappear

Level 3
Joined
Sep 20, 2024
Messages
15
Hello,
@Naelavok fixed a bug for his 8 player Human coop campaign (8-Player Co-op Campaign: The Scourge of Lordaeron (RoC Human)) which I've been trying to solve for my maps:

"
v1.04 changes:
  • Fixed an error that caused cinematic dialog to be cancelled when voting to skip
"

How did he do so players can vote to skip cutscenes but the dialogue (text and voices/sounds) doesn't get removed/muted for all when a player is spamming skip button (ESC)? I am looking for help to simplify the triggers and actions used to achieve this so anyone can add it to their map. I tried some of the variables and actions but I can't get it to work, perhaps I missed something vital.

Here is an intro cutscene from one of my maps:
  • Intro
    • Events
    • Conditions
    • Actions
      • Cinematic - Turn cinematic mode On for (All players)
      • Cinematic - Fade in over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Sound - Play Comradeship <gen>
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Camera - Apply Camera1 <gen> for (Picked player) over 0.00 seconds
      • Set VariableSet Point1 = (Center of IntroArthas1 <gen>)
      • Unit - Order Arthas 0032 <gen> to Move To Point1
      • Custom script: call RemoveLocation(udg_Point1)
      • Set VariableSet Point1 = (Center of IntroJaina1 <gen>)
      • Unit - Order Jaina 0033 <gen> to Move To Point1
      • Custom script: call RemoveLocation(udg_Point1)
      • Wait 3.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Trigger - Turn on Militia <gen>
      • Wait 2.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Camera - Apply Camera3 <gen> for (Picked player) over 0.00 seconds
      • Animation - Play Captain 0030 <gen>'s stand victory animation
      • Set VariableSet Point1 = (Center of IntroArthas2 <gen>)
      • Unit - Order Arthas 0032 <gen> to Move To Point1
      • Custom script: call RemoveLocation(udg_Point1)
      • Set VariableSet Point1 = (Center of IntroJaina2 <gen>)
      • Unit - Order Jaina 0033 <gen> to Move To Point1
      • Custom script: call RemoveLocation(udg_Point1)
      • Wait 2.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Cinematic - Send transmission to (All players) from Jaina 0033 <gen> named Jaina: Play H05Jaina01 <gen> and display Hearthglen, finally.... Modify duration: Add 0.00 seconds and Wait
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Set VariableSet Point1 = (Center of MilitiaGroup <gen>)
      • Unit - Make Arthas 0032 <gen> face Point1 over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Point1)
      • Set VariableSet Point1 = (Center of IntroCaptain <gen>)
      • Unit - Make Jaina 0033 <gen> face Point1 over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Point1)
      • Wait 2.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Camera - Apply Camera4 <gen> for (Picked player) over 0.00 seconds
      • Cinematic - Send transmission to (All players) from Arthas 0032 <gen> named Arthas: Play H05Arthas02 <gen> and display It looks like they'.... Modify duration: Add 0.00 seconds and Don't wait
      • Wait 3.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Set VariableSet Point1 = (Center of IntroCaptain <gen>)
      • Unit - Order Captain 0030 <gen> to Move To Point1
      • Custom script: call RemoveLocation(udg_Point1)
      • Wait 2.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Set VariableSet Point1 = (Center of IntroCaptain <gen>)
      • Unit - Make Arthas 0032 <gen> face Point1 over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Point1)
      • Set VariableSet Point1 = (Center of IntroMuradin <gen>)
      • Unit - Order Mountain King 0062 <gen> to Move To Point1
      • Custom script: call RemoveLocation(udg_Point1)
      • Cinematic - Send transmission to (All players) from Captain 0030 <gen> named Falric: Play H05Footman03 <gen> and display Prince Arthas! Duri.... Modify duration: Add 0.00 seconds and Don't wait
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Camera - Apply Camera5 <gen> for (Picked player) over 0.00 seconds
      • Wait 3.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 2.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 3.00 seconds
      • Trigger - Turn off Militia <gen>
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Cinematic - Send transmission to (All players) from Captain 0030 <gen> named Falric: Play H05Footman04 <gen> and display Now it's heading th.... Modify duration: Add 0.00 seconds and Wait
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Wait 1.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Set VariableSet Point1 = (Center of IntroGrainShipment <gen>)
      • Unit - Make Arthas 0032 <gen> face Point1 over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Point1)
      • Cinematic - Send transmission to (All players) from Arthas 0032 <gen> named Arthas: Play H05Arthas08 <gen> and display Wait! What did thos.... Modify duration: Add 0.00 seconds and Wait
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Set VariableSet Point1 = (Center of IntroGrainShipment <gen>)
      • Unit - Make Mountain King 0062 <gen> face Point1 over 0.00 seconds
      • Unit - Make Captain 0030 <gen> face Point1 over 0.00 seconds
      • Unit - Make Jaina 0033 <gen> face Point1 over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Point1)
      • Wait 2.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Camera - Apply Camera6 <gen> for (Picked player) over 0.00 seconds
      • Cinematic - Send transmission to (All players) from Captain 0030 <gen> named Falric: Play H05Footman09 <gen> and display Just the grain ship.... Modify duration: Add 0.00 seconds and Wait
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Set VariableSet Point1 = (Center of MilitiaGroup <gen>)
      • Unit - Make Arthas 0032 <gen> face Point1 over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Point1)
      • Set VariableSet Point1 = (Center of IntroMuradin <gen>)
      • Unit - Make Jaina 0033 <gen> face Point1 over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Point1)
      • Set VariableSet Point1 = (Center of IntroArthas2 <gen>)
      • Unit - Make Captain 0030 <gen> face Point1 over 0.00 seconds
      • Unit - Make Mountain King 0062 <gen> face Point1 over 0.00 seconds
      • Custom script: call RemoveLocation(udg_Point1)
      • Sound - Stop music After fading
      • Cinematic - Send transmission to (All players) from Arthas 0032 <gen> named Arthas: Play H05Arthas10 <gen> and display Oh no.. Modify duration: Add 0.00 seconds and Don't wait
      • Sound - Play Tension <gen>
      • Wait 2.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Camera - Apply Camera7 <gen> for (Picked player) over 0.00 seconds
          • Camera - Apply Camera8 <gen> for (Picked player) over 10.00 seconds
      • Cinematic - Send transmission to (All players) from Arthas 0032 <gen> named Arthas: Play H05Arthas11 <gen> and display The plague was neve.... Modify duration: Add 0.00 seconds and Don't wait
      • Wait 3.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Set VariableSet UnitGroup2 = (Units in Hearthglen <gen> owned by Neutral Passive)
      • Unit Group - Pick every unit in UnitGroup2 and do (Actions)
        • Loop - Actions
          • Set VariableSet Point1 = (Position of (Picked unit))
          • Unit - Create 1 Special Malganis for Neutral Passive at Point1 facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_Point1)
          • Unit - Add Dark Conversion (Malganis, Fast) to (Last created unit)
          • Unit - Order (Last created unit) to Special Miscellaneous - Dark Conversion (Fast) (Picked unit)
          • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
      • Custom script: call DestroyGroup(udg_UnitGroup2)
      • Wait 5.00 seconds
      • If (IntroCancelled Equal to True) then do (Skip remaining actions) else do (Do nothing)
      • Trigger - Run Intro End <gen> (checking conditions)
and here is my trigger to skip the intro cutscene:

  • Skip
    • Events
      • Player - Player 2 (Blue) skips a cinematic sequence
      • Player - Player 3 (Teal) skips a cinematic sequence
      • Player - Player 9 (Gray) skips a cinematic sequence
      • Player - Player 10 (Light Blue) skips a cinematic sequence
      • Player - Player 18 (Peach) skips a cinematic sequence
      • Player - Player 23 (Emerald) skips a cinematic sequence
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is in SkipPlayers.) Equal to False
        • Then - Actions
          • Player Group - Add (Triggering player) to SkipPlayers
          • Game - Display to (All players) the text: ((Name of (Triggering player)) + ( has voted to skip ( + ((String((Number of players in SkipPlayers))) + (/ + ((String((((Number of players in Players) / 2) + 1))) + ))))))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in SkipPlayers) Greater than or equal to (((Number of players in Players) / 2) + 1)
        • Then - Actions
          • Trigger - Run Intro End <gen> (checking conditions)
        • Else - Actions
 
Level 10
Joined
Jul 15, 2010
Messages
29
At map initialization, I call two custom scripts:
  • Custom script: call TryInitCinematicBehaviorBJ()
  • Custom script: call DisableTrigger(bj_cineSceneBeingSkipped)
These prevent the dialogue from being cancelled when people press Escape.
 
Top