13 years
edited 8 years
This library will allow you to disable/enable the feature that allows you to skip cinematic transmissions by pressing ESC. Some RPG's are ruined when other players press ESC during a cinematic because it skips the transmission for everyone. This neat script can prevent that.
Example code:
To use it, just create a new trigger and paste the code in there. If you do not have JNGP, then here is a JASS version:
Simply paste that into the map header. To access the map header, open the trigger editor and click on the map name listed on the left. Paste the code there. Then you can make a trigger like so:
[trigger]
My Trigger
Events
Map Initialization
Conditions
Actions
Custom script: call DisableTransmissionSkip()
[/trigger]
And it should disable transmission skipping for the entire game until you call "EnableTransmissionSkip()". To disable it again, simply call "DisableTransmissionSkip()" again.
Credits to: Troll-Brain for the suggestion long ago to disable the trigger instead of doing it the odd way I did it before.
1 library TransmissionSkip /* v.1.0.0.0
2 ********************************************************************3 *4 * The normal GUI cinematic functions allow you to skip 5 * transmissions by pressing ESC. This snippet will allow 6 * you to disable/enable that feature. 7 *8 ********************************************************************9 * 10 * Functions11 *12 * DisableTransmissionSkip()13 *14 * - Prevents players from skipping cinematic15 * transmissions by pressing ESC.16 *17 * EnableTransmissionSkip()18 *19 * - Allows players to skip cinematic transmissions20 * by pressing ESC, if you use the BJ/GUI functions.21 *22 ********************************************************************/23 24 function DisableTransmissionSkip takes nothing returns nothing
25 if bj_cineSceneBeingSkipped == null then
26 call TryInitCinematicBehaviorBJ()
27 endif28 call DisableTrigger(bj_cineSceneBeingSkipped)
29 endfunction30 31 function EnableTransmissionSkip takes nothing returns nothing
32 if bj_cineSceneBeingSkipped == null then
33 return34 endif35 call EnableTrigger(bj_cineSceneBeingSkipped)
36 endfunction37
38 endlibrary
Example code:
Example Code
To use it, just create a new trigger and paste the code in there. If you do not have JNGP, then here is a JASS version:
Vanilla JASS Version
1 // TransmissionSkip Library2
3 function DisableTransmissionSkip takes nothing returns nothing
4 if bj_cineSceneBeingSkipped == null then
5 call TryInitCinematicBehaviorBJ()
6 endif7 call DisableTrigger(bj_cineSceneBeingSkipped)
8 endfunction9 10 function EnableTransmissionSkip takes nothing returns nothing
11 if bj_cineSceneBeingSkipped == null then
12 return13 endif14 call EnableTrigger(bj_cineSceneBeingSkipped)
15 endfunction16 17 // End TransmissionSkip Library
Simply paste that into the map header. To access the map header, open the trigger editor and click on the map name listed on the left. Paste the code there. Then you can make a trigger like so:
[trigger]
My Trigger
Events
Map Initialization
Conditions
Actions
Custom script: call DisableTransmissionSkip()
[/trigger]
And it should disable transmission skipping for the entire game until you call "EnableTransmissionSkip()". To disable it again, simply call "DisableTransmissionSkip()" again.
Credits to: Troll-Brain for the suggestion long ago to disable the trigger instead of doing it the odd way I did it before.

Oh and thanks for fixing the trigger for me.