• 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 to disable transmission skipping?

Status
Not open for further replies.
Level 2
Joined
Oct 17, 2007
Messages
20
Hi,
During cinematic mode, I send transmissions from units, which the player can end early by pressing ESC. Is there a way to prevent the player from being able to cut off my transmissions by pressing ESC? Disable user control for all players doesn't seem to do the trick.

Thanks,
Volty
 
Level 2
Joined
Oct 17, 2007
Messages
20
Hrm... my problem is more accurately that in a multiplayer setting, my tutorial transmission can be skipped by one person, which seems to skip it for everyone. So I would be willing to settle for having one person's ESC-press only cancel his transmission or only cancel the transmission for him.
 
Level 6
Joined
Apr 28, 2005
Messages
155
Hi,
During cinematic mode, I send transmissions from units, which the player can end early by pressing ESC. Is there a way to prevent the player from being able to cut off my transmissions by pressing ESC? Disable user control for all players doesn't seem to do the trick.

Thanks,
Volty

I have the exact same problem. People that press Esc during the tutorial/introduction cinematic of my map. There doesn't seem to be an easy(or even possible?) sollution, but what I did was to display a message for everyone everytime someone press Esc:
"(Playername), do not press Esc during the tutorial!"
Haven't tested it online to see if people give a shit, but it should work in the sense that ignorant people may realize that it cuts it for everyone, or at least make them fear the wrath of the other players if they don't stop.

An addition to the "do not press esc" text would be to run the transmission all over again so that nothing important is lost.

Ah, you could have a boolean check for "true" every time a player presses the esc key (one boolean for each player). Each time the esc trig is run, just check to see if over half your booleans are "true".

And then?
 
Level 5
Joined
Jul 26, 2004
Messages
99
  • Your Trigger
    • Events
      • Player - Player 1 (Red) Presses the Escape key
      • Player - Player 2 (Blue) Presses the Escape key
      • Player - Player 3 (Teal) Presses the Escape key
    • Conditions
    • Actions
      • If Triggering player Equal to Player 1 (Red) then Set Boolean_EscCheck[1] = True else do nothing
      • If Triggering player Equal to Player 2 (Blue) then Set Boolean_EscCheck[2] = True else do nothing
      • If Triggering player Equal to Player 3 (Teal) then Set Boolean_EscCheck[3] = True else do nothing
      • If all conditions are true do (Then actions) else do (Else actions)
        • If - Conditions
          • Or - Any conditions are true
            • And - All conditions are true
              • Boolean_EscCheck[1] Equal to True
              • Boolean_EscCheck[2] Equal to True
              • Boolean_EscCheck[3] Equal to False
            • And - All conditions are true
              • Boolean_EscCheck[1] Equal to True
              • Boolean_EscCheck[2] Equal to False
              • Boolean_EscCheck[3] Equal to True
            • And - All conditions are true
              • Boolean_EscCheck[1] Equal to False
              • Boolean_EscCheck[2] Equal to True
              • Boolean_EscCheck[3] Equal to True
        • Then - Actions
          • Cinematic - *Perform whatever functions you need to end the cinematic smoothly
        • Else - Actions
          • Do nothing
This help?

You can also design the trigger to run off of an integer instead (less lines of code), where every time a player presses the esc key, it increases the integer value by one. Once the integer is greater than a number equal to half the number of playing players in the game, you run the necessary actions to end your cinematic.
 
Level 12
Joined
Feb 1, 2007
Messages
1,092
Aha Yes! There is the answer. What you do is when someone skips a cinematic, set a boolean array called watchingcin to false, then check run a trigger like the following (note referencenuber is made in the beggining by couting hte players in the game and notwatching is just another integer)

A Player skips a Cinematic
Custom Script= local player udg_skipper
If Triggering player=player one
then set watchingcin(1)=false and skipper=triggering player
(repeat above for all humans players)
Set notwatching=notwatching+1
If notwatching(equal to or greater than)(referencenumber/2)
then disable your cinematic for all players and run game start triggers
else wait 5 seconds then set notwatching=notwatching-1 and run cinematic trigger for skipper and set watchingcin(1)=true

Variable overview:
skipper-player variable, non array
referencenumber-integer, non array
notwatching-integer, non array
watchingcin-boolean, 12 array

So yeah, thats my idea in a nutshell, it gives everyone time to quit and if they all do within five seconds of eachother, it will end the cin, if not they get to watch it again. I forgot why I put watchingcin in there but I know its important for something (I think) and if I remember, I will edit it in. And yeah, theres a place in there SOMEWHERE that you can put a text in like We are checking if the cin should be skipped, please stand by.
 
Level 5
Joined
Dec 29, 2008
Messages
61
I found a solution this problem. Credit: http://www.jx3.net/TDG/forum/viewtopic.php?f=4&t=1393

The solution I went with is to include the following at map initialization, which prevents all skipping of transmissions.

  • Custom script: set bj_cineSceneBeingSkipped = CreateTrigger()

What does cineSceneBeingSkipped refer to? Is this a specific cinematic stored as a variable or will this just work everything?
 
Level 42
Joined
Feb 27, 2007
Messages
5,330
bj_cineSceneBeingSkipped is a global trigger variable that actually does the listening for the Esc key and the actual skip itself. The variable is only used in this function, which is then called by many other cinematic-focused BJ functions like 'transmission from unit':
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
That function checks if the trigger hasn't been 'made' yet (if it's not == null) and if so adds the appropriate events and action. By setting the variable manually before that function is ever run, that check will always fail so the trigger will never have events and actions added to it. Therefore cinematics cannot be skipped.

Say you want some cinematics to be skippable and some not to be? A solution is to run this function once manually on map init (call TryInitCinematicBehaviorBJ()) to generate the correct trigger, then manually disable the trigger (call DisableTrigger(bj_cineSceneBeingSkipped)) right after. When you want a cinematic to become skippable, enable that trigger temporarily (call EnableTrigger(bj_cineSceneBeingSkipped)).
 
Status
Not open for further replies.
Top