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

In multi-player game, ESC skips for everyone?!

Status
Not open for further replies.
Level 14
Joined
Aug 30, 2004
Messages
909
I am testing my map now and finding that multiplayer isn't as simple as it looks. Here's the problem:

I have an intro where I show the players the major points in the map before they start. The problem: when one player hits the ESC key, the dialogue for every player is cut short!

Here's an example of the trigger, but it happens on all of them:

  • Initial 0
    • Events
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Player Group - Pick every player in Imperials and do (Actions)
        • Loop - Actions
          • Camera - Apply Intro 1 <gen> for (Picked player) over 0.00 seconds
      • Cinematic - Send transmission to Rebels from a Player 11 (Dark Green) Rebel Marine named Colonel South at tempPoint: Play No sound and display Thanks for coming t.... Modify duration: Set to 12.00 seconds and Don't wait
      • Cinematic - Send transmission to Imperials from a Player 12 (Brown) Acolyte named Moff Reilly at tempPoint: Play No sound and display Welcome to Operatio.... Modify duration: Set to 12.00 seconds and Don't wait
      • Trigger - Add to Initial 1 <gen> the event (Time - introTimer expires)
      • Countdown Timer - Start introTimer as a One-shot timer that will expire in 12.00 seconds
What's even weirder, if a player in "Rebels" skips, it will skip the cinematic playing for the Imperials! So they aren't even looking at the same transmission.

I assume this is just a feature of multiplayer maps. How do people get around this? It would be annoying for new players to have others skipping the cinematic introduction for them.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Yeah, countless cinematic introductions of GUI-using maps get destroyed by this functionality and the fact that some players just feel the urge to do crap.

You can either restore the cinematic scene (you would have to save the current playing one, track time etc) or go over to the jass native form of the SetCinematicScene function, which does not react to pressing esc at all, skipping cinematics is a feature of the GUI-variant.
 
Level 9
Joined
Jan 23, 2008
Messages
321
Yeah, countless cinematic introductions of GUI-using maps get destroyed by this functionality and the fact that some players just feel the urge to do crap.

You can either restore the cinematic scene (you would have to save the current playing one, track time etc) or go over to the jass native form of the SetCinematicScene function, which does not react to pressing esc at all, skipping cinematics is a feature of the GUI-variant.

There is basicly no solution for your problem, however you can type the text as floating or some sort of screen text like this.

Samuel: The Ogres cannot be pirates, they are too fat the ships won't handle them.
Stupid John: :ogre_datass: Arrr!!
 
Level 14
Joined
Aug 30, 2004
Messages
909
Yeah, countless cinematic introductions of GUI-using maps get destroyed by this functionality and the fact that some players just feel the urge to do crap.

You can either restore the cinematic scene (you would have to save the current playing one, track time etc) or go over to the jass native form of the SetCinematicScene function, which does not react to pressing esc at all, skipping cinematics is a feature of the GUI-variant.

I don't understand the SetCinematicScene function at all. I don't know Jass I'm afraid. Is there a simple line or two of custom script that I could use?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
native SetCinematicScene takes integer portraitUnitId, playercolor color, string speakerTitle, string text, real sceneDuration, real voiceoverDuration returns nothing

This function takes six parameters. Using the Custom Script action (3rd from above in the all-actions list), you can implement a jass line in GUI-triggers.

  • Custom script: call SetCinematicScene(<portraitUnitId>, <color>, <speakerTitle>, <text>, <sceneDuration>, <voiceoverDuration>)
Since you do not know how to fill the parameters in jass, how to state a unit type id for example and you do not want to write jass all the time, I suggest you make a separate trigger like this:

  • SetCinematicScene
    • Events
    • Conditions
    • Actions
      • Custom script: call SetCinematicScene(udg_Cine_portraitUnitId, udg_Cine_color, udg_Cine_speakerTitle, udg_Cine_text, udg_Cine_sceneDuration, udg_Cine_voiceoverDuration)
Variables that you create in GUI are prefixed with "udg_" in jass. So you declare following variables:

Cine_portraitUnitId of type Integer
Cine_color of type Player Color
Cine_speakerTitle and Cine_text of type String
Cine_sceneDuration and Cine_voiceoverDuration of type Real
All without array/preset value does not matter.

Now, the above trigger serves as a function that you call from other places with this pattern:

  • Set Cine_portraitUnitId = <value>
  • Set Cine_color = <value>
  • Set Cine_speakerTitle = <value>
  • Set Cine_text = <value>
  • Set Cine_sceneDuration = <value>
  • Set Cine_voiceoverDuration = <value>
  • Trigger - Run SetCinematicScene <gen> (ignoring conditions)
That are Set Variable-actions and Trigger - Run (Ignoring Conditions). This way, you can specify the parameters in GUI.

If you need more features from the GUI transmission actions, ask, as this is a composition of different jass functions. The only thing that cannot be copied via this method should be the built-in trigger wait, as we call another trigger here.
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
If I understand question correctly, just do that(you don't want esc button to disable cinematic text right?)
  • Events
    • Map initialization
  • Actions
    • Custom script: set bj_cineSceneBeingSkipped = CreateTrigger()
 
Level 14
Joined
Aug 30, 2004
Messages
909
If I understand question correctly, just do that(you don't want esc button to disable cinematic text right?)
  • Events
    • Map initialization
  • Actions
    • Custom script: set bj_cineSceneBeingSkipped = CreateTrigger()

You do understand, thank you. I have a few questions though and I'm afraid I can't play test the map's multiplayer functionality very well, so I have to ask you.

1. Does "CreateTrigger()" refer to a trigger of mine or are those the exact letters I type into the custom script action?
2. Do I need to put this script for every cinematic action or just once at the beginning of my map?

Thanks again, and thanks to you too WaterKnight; I'd give +rep but you're on cooldown apparently!
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
1. That is exactly what you type in. It is a function that creates a new trigger object.

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 snippet gets run when you start a transmission in GUI. Ceday's plan is to write the bj_cineSceneBeingSkipped in beginning, so it won't be null when this function is started and think the cinematic skip trigger was already initiated but in reality lacks events and actions, therefore does nothing.

2. As you can see from the event, just once before any transmission is sent.
 
Status
Not open for further replies.
Top