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

[easy to use] Skippable Transmission v1.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: JesusHipster
Using this spell with normal GUI
There is an easy-to-follow instruction for using this system with normal World Editor!
Instructions on how to use and how to import, are included in the test map.
About this system

This little system is meant to enable players to skip video transmissions by pressing the ESC button independently. The system is designed to set up multiple skippable video transmissions very easily in a trigger-based style. The system is MPI, and you can play as many skippable transmissions in a row, but you can only set up one transmission a time per player (which is not a real minus, because why would you want more of them?).

After having played a lot of RPG-like maps from the hiveworkshop lately, I realized, that there are not many, that use at least a decent way to skip cinematic transmissions.
That is why I decided to share my system, which I use in a few Multiplayer maps of mine.

I hope, this transmission system helps some people to make their maps less cumbersome.

Check out that test map to get a clearer picture of what this is about.
The system uses TriggerSleepAction() a.k.a trigger waits in a similar way, that PolledWait() by Blizzard works. If this is a problem, I could modify it by only relying on the timer itself. Yet, it works, if you understand, that each Transmission is equivalent to a TriggerSleepAction(). So do not use event responses or unsafe global variables after the system call.


JASS:
library CIN initializer RegisterCinematicSystem

/* README ***************************************************************************************************************************************************************************************************************************
       
       *** About:
       This system can be used to create skippable cinematic transmissions. 
       Transmissions can be skipped by pressing the ESC button. This can be allowed for each player at map initialization.
       The system can be used to display video transmissions or subtitle transmissions, which can be skipped for each player 
       independently. 
       
       IF YOU DO NOT HAVE AN EDITOR, THAT CAN HANDLE vJASS (e.g. JNGP), PLEASE CHECK OUT THE FOLDER "USE THIS IN NORMAL GUI"
       
       ***
       ***
       *** How to use (a-c):
        a) transmission styles
            there are 5 transmission styles to control the system in single or multiple following transmissions.
            these styles can be requested by using integer numbers from 1 to 5. For convenience, they can be used by named integer variables:
            
         default variable string        -    integer system no.   -   what effect does it create?
        --------------------------------------------------------------------------------------------------------------------------------
        udg_CINE_SCENE_SUBTITLES        -     1                   -   Creates text transmissions in subtitle style. UI won't be affected.
        udg_CINE_SCENE_FADEOUTIN        -     2                   -   Normal cinematic transmission style. Fade UI out before and in after video scene.
        udg_CINE_SCENE_FADEOUT_KEEP_UI  -     3                   -   Fade UI in for video transmission and keep the interface hidden for next transmission
        udg_CINE_SCENE_KEEP_UI_FADEIN   -     4                   -   Do not fade UI out, instead use interface from last transmission, and fade in UI to exit to game interface after this transmission
        udg_CINE_SCENE_KEEP_UI          -     5                   -   Intermediate transmission, do not fade out UI nor in. 
        
        b) using the system
            - call the function:
            PLAYER_CINEMATIK takes player p, integer interfaceMod, real fadeDuration1, real fadeDuration2, unit transmissionUnit, string title, string text, real wait, sound sounddat, boolean skippable returns nothing
            
                player p:           this is the player affected (locally)
                interfaceMod:       transmission style (see a))
                fadeDuration1:      time to fade out game interface 
                fadeDuration2:      time to fade in game interface 
                transmissionUnit:   unit, that transmitts the transmission 
                title:              title of the transmission (e.g. unit name)
                text:               transmission text
                wait:               transmission time, this is the duration of the transmission
                sounddat:           sound for transmission 
                skippable:          is transmission skippable or not?
                
            - set the value skippable to TRUE, if you want the transmission to be skippable or to FALSE, if not.
             
         c) placing the system call in your triggers:
            - as the transmission system uses TriggerSleepAction() a.k.a trigger waits, it is important not to place code under the function call.
              that is not "consistent" (e.g. event responses, global variables that may change, etc.)
       ***
       ***
       
       *** How to make multiple transmissions:
       - 1. transmission:            udg_CINE_SCENE_FADEOUT_KEEP_UI (style 3)
       - intermediate transmissions: udg_CINE_SCENE_KEEP_UI (style 5)
       - last transmission:          udg_CINE_SCENE_KEEP_UI_FADEIN (style 4)
       
       *** How to use transmissions without sound:
       - use udg_CINE_SOUND_NONE or the expression null for sounddat at system call, if you do not want to display sound in a transmission.

       *** How to use udg_CINE_SOUND_FADEOUT:
       - this value defines, whether a sound will be stopped after a transmission ends or not. 
       - FALSE means, it will be stopped.
       - set this value to TRUE, if you want the sound to play to the end, if transmission ends
       - NOTE: set it back to FALSE after the transmission to assure proper functioning of the system.
       
       *** How many transmissions at one time point are possible?
       - The system is fully MPI, but you can only display one transmission per player at the same time.
       
END README ***************************************************************************************************************************************************************************************************************************

       
       *** System Array:
        [Id+ 0*A]       Transmission already on?
        [Id+ 1*A]       Transmission is allowed to be skipped for player
        [Id+ 2*A]       Transmission has been already skipped by player
        (1 == true, 0 == false)                                                                              */
    
    globals 
        private integer array   CINE_DATA                           // this is used as an internal array to store all system related info
        private integer         A           = bj_MAX_PLAYERS        // this is just to increase readability
    endglobals

    // ***************************************************************************************************************
    // SKIP CINEMATIC TRANSMISSIONS
    // **************************************************************************************************************
    private function PLAYER_CINEMATIC_CONDITION takes nothing returns boolean
        // only allow a player to skip a function, that is enabled to do so
        return CINE_DATA[GetPlayerId( GetTriggerPlayer())+A] == 1
    endfunction

    private function PLAYER_CINEMATIC_SKIP takes nothing returns nothing
        // if a player is allowed to skip a cinematic by pressing the ESC button, do so now
        local player  cinePlayer       = GetTriggerPlayer()
        local integer playerId         = GetPlayerId( cinePlayer)

        // End cinematic scene
        if GetLocalPlayer() == cinePlayer then
            call EndCinematicScene()
        endif
        // STORE "BEING SKIPPED"
        set CINE_DATA[playerId+(2*A)] = 1
        
        set cinePlayer = null
    endfunction

    // ***************************************************************************************************************
    // TRANSMISSION MODULE
    // **************************************************************************************************************
    public function PLAYER_CINEMATIC takes player p, integer interfaceMod, real fadeDuration1, real fadeDuration2, unit transmissionUnit, string title, string text, real wait, sound sounddat, boolean skippable returns nothing
        // Main function to call the system
        local integer playerId              = GetPlayerId( p)
        local integer i                     = 0
        local timer   TRANSMISSION_WAITING 
        
        // Do not allow more than one transmission for the same player
        if CINE_DATA[playerId] == 0 then
            set CINE_DATA[playerId]   = 1 // Lock Transmission status directly after starting to disable re-triggering.
            set TRANSMISSION_WAITING  = CreateTimer()
            // Check for interfaceMod of requested transmission
            if interfaceMod == 1 then
                // interfaceMod == 1: Subtitle style
                if GetLocalPlayer() == p then
                    call ForceCinematicSubtitles( TRUE)
                endif
            elseif ( interfaceMod == 2 ) or ( interfaceMod == 3 ) then
                // interfaceMod == 2: Standard Transmissions
                // interfaceMod == 3: First of Multitransmissions (Keep Interface later)
                if GetLocalPlayer() == p then
                    call ShowInterface( FALSE, fadeDuration1)
                endif
            endif
            // interfaceMod == 4: dont show interface, because its already on, but hide after this one!
            // interfaceMod >= 5: do not change anything, because UI has to be kept during intermediate transmissions
            // skippable means, transmission can be skipped entirely for this specific player!
            if skippable then
                set CINE_DATA[playerId+A] = 1 // skippable
            else
                set CINE_DATA[playerId+A] = 0 // not skippable
            endif
            // Blizzard Transmission Parameters
            set bj_lastTransmissionDuration                   = wait 
            set bj_lastPlayedSound                            = sounddat
            set bj_cineSceneLastSound                         = sounddat
            // set up transmission sound and store transmission sound information
            if sounddat != null and (GetLocalPlayer() == p) then
                call StartSound( sounddat)
            endif 
            // Set up the actual transmission
            if GetLocalPlayer() == p then
                call SetCinematicScene( GetUnitTypeId( transmissionUnit), GetPlayerColor( p), title, text, bj_lastTransmissionDuration + bj_TRANSMISSION_PORT_HANGTIME, bj_lastTransmissionDuration)
                call PingMinimap( GetUnitX( transmissionUnit), GetUnitY( transmissionUnit), bj_TRANSMISSION_PING_TIME)
                if not IsUnitHidden( transmissionUnit) then
                    call UnitAddIndicator( transmissionUnit, bj_TRANSMISSION_IND_RED, bj_TRANSMISSION_IND_BLUE, bj_TRANSMISSION_IND_GREEN, bj_TRANSMISSION_IND_ALPHA)
                endif
            endif
            // wait for transmission time           
            call TimerStart( TRANSMISSION_WAITING, bj_lastTransmissionDuration, FALSE, null)
            loop
                exitwhen TimerGetRemaining( TRANSMISSION_WAITING) == 0.00 or (CINE_DATA[playerId+(2*A)] == 1)
                call TriggerSleepAction(0.10)
            endloop 
            // After end of transmission (if skipped or not), reset UI, if needed (true for 1,2,4)
            // Do specific changes for each cinematic set up
            if interfaceMod == 1 then
                // Force subtitle transmissions to end
                if GetLocalPlayer() == p then
                    call ForceCinematicSubtitles( FALSE)
                    call ClearTextMessages()
                endif
            elseif ( interfaceMod == 2 ) or ( interfaceMod == 4 ) then
                // show interface after normal cinematic style (2) and if end of multi transmissions (4)
                if GetLocalPlayer() == p then
                    call ShowInterface( TRUE, 0.10)
                endif
            endif
            // End the cinematic Sound, if there is one
            if sounddat != null and (GetLocalPlayer() == p) then
                call StopSound( sounddat, FALSE, udg_CINE_SOUND_FADEOUT)
            endif
            // reset the system for Array Layer 1 and 3 (keep the other values for more transmissions)
            set CINE_DATA[playerId]     = 0  // Release Transmission to Off to allow new transmissions
            set CINE_DATA[playerId+A]   = 0  // Reset skippable transmissions
            set CINE_DATA[playerId+2*A] = 0  // Release Cinematik Skippable   
            call DestroyTimer( TRANSMISSION_WAITING)
        endif
        
        set TRANSMISSION_WAITING = null 
    endfunction
    
    function RegisterCinematicSystemExecute takes nothing returns nothing
        // this trigger initializes the system and creates a trigger, to skip cinematic transimssions
        local timer t            = GetExpiredTimer()
        local integer index      = 0
        local trigger cineTrig   = CreateTrigger()
        local player  cinePlayer
        
        loop
            exitwhen index > A - 1
            // register playing players, that are allowed to skip cinematic transmissions
            if udg_CINE_ALLOWED_TO_SKIP[index] then
                set cinePlayer = Player( index)
                if GetPlayerSlotState( cinePlayer) == PLAYER_SLOT_STATE_PLAYING then        
                    // Initialize the transmission ESC function 
                    call TriggerRegisterPlayerEvent( cineTrig, cinePlayer, EVENT_PLAYER_END_CINEMATIC)           
                endif
            endif
            set index = index + 1
        endloop
        call TriggerAddCondition( cineTrig, function PLAYER_CINEMATIC_CONDITION)
        call TriggerAddAction( cineTrig, function PLAYER_CINEMATIC_SKIP)
        
        call DestroyTimer( t)
        set t           = null
        set cineTrig    = null
        set cinePlayer  = null
    endfunction
    
    function RegisterCinematicSystem takes nothing returns nothing
        call TimerStart( CreateTimer(), 0., FALSE, function RegisterCinematicSystemExecute)
    endfunction
    
endlibrary

  • SkippableTransmissions Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- For each player, you can allow or disallow transmissions to be skipped at initialization. --------
      • -------- Set to TRUE, if you want the player to be allowed to skip transmissions. --------
      • -------- Set to FALSE, if you do not want to allow players to be registered for this system --------
      • -------- NOTE: this is used to allow/disallow players for the system. Transmissions are made skippable/non-skippable by the function calls themselves. --------
      • -------- Player 1 --------
      • Set CINE_ALLOWED_TO_SKIP[0] = True
      • -------- Player 2 --------
      • Set CINE_ALLOWED_TO_SKIP[1] = True
      • -------- Player 3 --------
      • Set CINE_ALLOWED_TO_SKIP[2] = True
      • -------- Player 4 --------
      • Set CINE_ALLOWED_TO_SKIP[3] = True
      • -------- Player 5 --------
      • Set CINE_ALLOWED_TO_SKIP[4] = True
      • -------- Player 6 --------
      • Set CINE_ALLOWED_TO_SKIP[5] = True
      • -------- Player 7 --------
      • Set CINE_ALLOWED_TO_SKIP[6] = True
      • -------- Player 8 --------
      • Set CINE_ALLOWED_TO_SKIP[7] = True
      • -------- Player 9 --------
      • Set CINE_ALLOWED_TO_SKIP[8] = True
      • -------- Player 10 --------
      • Set CINE_ALLOWED_TO_SKIP[9] = True
      • -------- Player 11 --------
      • Set CINE_ALLOWED_TO_SKIP[10] = True
      • -------- Player 12 --------
      • Set CINE_ALLOWED_TO_SKIP[11] = True
      • -------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Init Sounds here, that can be played by transmissions. --------
      • Set CINE_SOUND[0] = No Sound
      • -------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- Adjust the boolean value CINE_SOUND_FADEOUT, to set up behaviour of transmission sounds upon skipped transmission --------
      • -------- If TRUE, then the sound will play to the end even after the transmission is skipped. --------
      • -------- If FALSE, the sound will be skipped when the transmission is skipped --------
      • Set CINE_SOUND_FADEOUT = True
      • -------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------
      • -------- The following variables are preset for convenient use of the transmission styles --------
      • -------- refer to readme to find out, how to use them --------
      • -------- You can change their names to a name, you prefer, in variables editor --------
      • -------- NOTE: do not change the values themselves. --------
      • Set CINE_SCENE_SUBTITLES = 1
      • Set CINE_SCENE_FADEOUTIN = 2
      • Set CINE_SCENE_FADEOUT_KEEP_UI = 3
      • Set CINE_SCENE_KEEP_UI_FADEIN = 4
      • Set CINE_SCENE_KEEP_UI = 5

Simple Example on how to set up a multiple, skippable transmission series (from the Map):
  • multiple transmissions
    • Events
      • Unit - A unit enters multiple <gen>
    • Conditions
      • (Triggering unit) Equal (==) Paladin 0003 <gen>
    • Actions
      • Set CINE_TEXT = This is a multiple transmission, that comprises of skippable transmissions.
      • Set CINE_PLAYER = (Owner of (Triggering unit))
      • Set CINE_TITLE = (Name of Paladin 0003 <gen>)
      • Set CINE_TIME = 5.00
      • Set CINE_SKIPPABLE = True
      • Set CINE_UNIT = Circle of Power 0000 <gen>
      • Custom script: call CIN_PLAYER_CINEMATIC( udg_CINE_PLAYER, udg_CINE_SCENE_FADEOUT_KEEP_UI, 0.25, 0.25, udg_CINE_UNIT, udg_CINE_TITLE, udg_CINE_TEXT, udg_CINE_TIME, udg_CINE_SOUND[2], udg_CINE_SKIPPABLE)
      • Set CINE_TEXT = Intermediate Transmissions do not change the UI. You can use as many as you want in a row
      • Set CINE_TIME = 10.00
      • Custom script: call CIN_PLAYER_CINEMATIC( udg_CINE_PLAYER, udg_CINE_SCENE_KEEP_UI, 0.25, 0.25, udg_CINE_UNIT, udg_CINE_TITLE, udg_CINE_TEXT, udg_CINE_TIME, udg_CINE_SOUND[2], udg_CINE_SKIPPABLE)
      • Set CINE_TIME = 12.00
      • Set CINE_TEXT = After multiple transmissions, you have to use the system to reset the UI for respective player
      • Custom script: call CIN_PLAYER_CINEMATIC( udg_CINE_PLAYER, udg_CINE_SCENE_KEEP_UI_FADEIN, 0.25, 0.25, udg_CINE_UNIT, udg_CINE_TITLE, udg_CINE_TEXT, udg_CINE_TIME, udg_CINE_SOUND[1], udg_CINE_SKIPPABLE)
-v1.0 Upload
-v1.1 Added a GUI-friendly ease-to-import version
Fixed a bug with bj_maxPlayers



Keywords:
Video, Transmission, skippable, Skip, Skippable, Cinematic, MPI, RPG, subtitle, text, system, GUI, Jass, Multiple.
Contents

Transmission Functions (Map)

Reviews
03:01, 5th Jun 2016 Tank-Commander: V1.1 - An interesting submission, I apologise that it's taken so long to get around to reviewing it, please see my post for critique

Moderator

M

Moderator

03:01, 5th Jun 2016
Tank-Commander: V1.1 - An interesting submission, I apologise that it's taken so long to get around to reviewing it, please see my post for critique
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
thanks for pointing that out. I changed the description and added this information.

The thing is, this somehow aims to help beginners to intermediate map-makers (as I assume, every experienced map maker uses something like this?), so I tried not to scare people away from it by declaring this as vJass ..

Do you think, this is even useful? Should I improve it?
I am happy about any suggestions :)
 
Level 22
Joined
Aug 27, 2013
Messages
3,973
The thing is, this somehow aims to help beginners to intermediate map-makers (as I assume, every experienced map maker uses something like this?), so I tried not to scare people away from it by declaring this as vJass ..
I can see your point but by not doing that, the user will experience problem instead as vJASS requires JNGP and doesn't work with Vanilla World Editor.

Can't give you any feedback for the code, though. I'm not a vJASS user.
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
I could add a non-JNGP version, where you have to copy the function to your map header, and call the Initialization from the GUI init trigger - but I dont know if this will be accepted on the hive? Using vJass for this system is not required but it is simply more convenient to use a library.



EDIT: I uploaded an instruction on how to easily important this system into normal GUI trigger editor in 3 steps.
 
Last edited:
Level 14
Joined
Jul 1, 2008
Messages
1,314
Not going to say this is bad, but you'd need to build the entire cinematic around the system which is not exactly what I'd wanted if I'd use this system.

Thanks for sharing your feedback, Chaosy, but can you maybe explain a bit more? All it does basicly, is exchaning the normal transmission call with a skippable one. I dont really understand, where you have to build something around the system?
Do you mean by that, that it is impractical to use the custom script?
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
By reading the title I thought someone (you) had come up with a system I could simply add to my map and it would somehow make my transmissions skip-able.

However you'd have to change the entire cinematic (almost). It's not simply" copy and pasting the custom script".
When working with GUI cinematics you usually don't have a variable ready for the text, the player, the unit etc. Thus you'd have to copy over all these things over to the script, it's a fair amount of boring work.

Still, one improvement I'd suggest is the syntax. I strongly suggest to work with structs to use syntax like:
transmission.next.next.next
transmission.prev.prev
That way the user would be able to jump between transmissions freely.

This would still require the user to put effort to make the system work with his cinematic if already started it, but if you create something from scratch I think this would be a better approach.

I got quite motivated by writing this..

edit: something like this:
JASS:
//! zinc
	library CinematicScene requires TimerUtils
	{	
		type transCallback extends function(integer);
		
		function daCallback(integer this, transCallback c)
		{
			c.evaluate(this);
		}
		
		public struct Scene
		{
			thistype next;
			thistype prev;
			
			force p = bj_FORCE_PLAYER[0];
			unit u;
			string name, msg;
			real time = 3;

			transCallback callback;
	
			static timer countdown;
	
			static thistype last;
			
			static boolean first = true;
			
			static thistype current;
			
			static method onNext()
			{
				thistype this = GetTimerData(countdown);
				DestroyTimer(countdown);
				this.next.Start();
			}
			
			method Start()
			{
				current = this;
				this.name = GetUnitName(u);
				TransmissionFromUnitWithNameBJ(p, u, name, null, msg, bj_TIMETYPE_SET, time, false);
				if(callback != null)
				{
					daCallback(this, callback);
				}
				countdown = NewTimerEx(this);
				TimerStart(countdown, time, false, function thistype.onNext);
			}
			
			static method create() -> thistype
			{
				thistype this = thistype.allocate();
				p = bj_FORCE_PLAYER[0];
				if(first == false)
				{
					last.next = this;
					last.next.prev = last;
				}
				else
				{
					first = false;
				}
				last = this;
				return this;
			}
			
			static method onInit()
			{
				countdown = NewTimer();
			}
		}		
	}
//! endzinc
JASS:
//! zinc
	library MEGADEMO requires CinematicScene
	{
	
		function RestartCine(Scene s)
		{
			s.next = s.prev.prev; //aka going back two scenes
                       //I could set s.callback to null here to save some performance since this only needs to happen once.
		}
		
		Scene sOne, sTwo, sThree;
		
		function onInit()
		{
			unit test = CreateUnit(Player(0), 'hfoo', 0, 0, 0);
			
			sOne = Scene.create();
			sTwo = Scene.create();
			sThree = Scene.create();
			
			sOne.msg = "Da dum tss 1";
			sOne.u   = test;
			
			sTwo.msg = "Da dum tss 2";
			sTwo.u   = test;
			
			sThree.msg = "Da dum tss 3";
			sThree.u   = test;
			sThree.callback = RestartCine;
			
			sOne.Start();
			
		}
	}
//! endzinc

This little script will cycle through three transmissions. But I could manipulate them in any way I wanted I could skip the middle one entirely etc, play them backwards.
 
Last edited:
Level 14
Joined
Jul 1, 2008
Messages
1,314
Ah, now I see, what you mean - and thanks for this intense feedback.

I still think, that using this system is not that much work, but I get your point.

I do not feel comfortable in oop yet to release code in that style. Maybe you want to finish your proposed system? You are right, it has much more potential than my system, but on the other hand, its more expertly code would make it less attractive for gui users, I guess.

edit:
By reading the title I thought someone (you) had come up with a system I could simply add to my map and it would somehow make my transmissions skip-able.
I wrote easy to use not easy to implement :p
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
You are right, it has much more potential than my system, but on the other hand, its more expertly code would make it less attractive for gui users, I guess.
I suspect that this is true. Using my method in GUI is not the best of choices I guess. But in a way I think it's easier to use if you understand the syntax.

edit: updated my system I can now use this to skip transmissions:
  • Demo 2
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Custom script: call DestroyTimer(Scene.countdown)
      • Custom script: call Scene.current.next.Start()
 
Last edited:
Level 14
Joined
Jul 1, 2008
Messages
1,314
You only have to make it MPI now, Chaosy.

Chaosy
I think it's easier to use if you understand the syntax.
I actually experienced quite often, that oop systems scare away gui users, even if they only had to use custom scripts, because there is no way, most people get what you coded.
But yeah, your system is neat.

I just thought of a way, we can recognize, if a player is in a cinematic. Maybe ForceUIKey or ForceSelection or something like this works. I am going to try ...

Rheiko
I was hoping easy for both.
Sry :p On the other hand, it is not that bad. I actually tried it. It pays out for longer cinematics though, because you have to set most variables only once.

I mean, if you compare it to all these classic tutorials and threads on how to make cinematics skippable, my system is actually both, easy to implement and use.

Edit: Also, I provided a version, which you can actually use with normal Vanilla GUI (without JNGP) in a very flexible manner and in GUI style. It is easy to follow through. This is a clear advantage over the vJass variants for GUI users
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
then I would suggest to use bj_FORCE_ALL_PLAYERS instead of bj_FORCE_PLAYER[0].

MPI is something, I was actually aiming for. Think of an ORPG for example. Every player may be involved in some conversation, which may be skipped independently from each other.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
Does this support waiting to skip the cinematic until all players have successfully escaped out of it?

What you can do is make the system queue up codes or function name strings and run them via TriggerExecute/Evaluate or ExecuteFunc (depending on your preference). Something like "CinematicAddScene". This way, the cinematic skipping can be handled internally by this system, and you'd use a "CinematicCleanup" behavior to remove any extra features not needed by the system.
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
Hi Bribe,

thank you for your comment.

Does this support waiting to skip the cinematic until all players have successfully escaped out of it?

No, but I thought of implementing this. Right now, it is completely independent.
I did not add this, because I was not sure about a good solution. Now that you mention it, I am thinking of adding a check up for each single transmission, that waits for all other player. Is this kind of synch, what you suggested?

What you can do is make the system queue up codes or function name strings and run them via TriggerExecute/Evaluate or ExecuteFunc (depending on your preference). Something like "CinematicAddScene". This way, the cinematic skipping can be handled internally by this system, and you'd use a "CinematicCleanup" behavior to remove any extra features not needed by the system.

To get rid of the TriggerSleepAction?
 
Going over the criticisms made I'm going to summarise the key points of issue for the system at the moment:
- While being described as easy to use
  • Custom script: call CIN_PLAYER_CINEMATIC( udg_CINE_PLAYER, udg_CINE_SCENE_FADEOUT_KEEP_UI, 0.25, 0.25, udg_CINE_UNIT, udg_CINE_TITLE, udg_CINE_TEXT, udg_CINE_TIME, udg_CINE_SOUND[2], udg_CINE_SKIPPABLE)
isn't a particularly friendly looking line, while arguably less efficient it'd probably be better to have all those things applied to globals and then use a simple function call (e.g. CIN_PLAYER_CINEMATIC()) after all of those things have been set up
- I strongly endorse Bribe's suggestions for both his suggested feature and handling method, it would improve the system's applicability and ease of use (particularly because it's plausible that people would want to add optional skipping as an afterthought rather than beforehand)
- Alternatively I'd suggest a structure similar to Chaosy's method, though I know you've stated your not entirely comfortable with OOP to that degree. though I'd place this second as I wouldn't want you to go through with the extra effort only for it to be superseded by Chaosy's before you finished
- I would strongly recommend against the use of TSA given its inconsistencies
- You have an inefficient IF structure in your code (most notably at the interfaceMod section where you filter using GetLocalPlayer in a nested IF statement when it could be on the other side of the nesting and be more efficient

other minor comments:
- You have some needless nulling of handles which don't need to be nulled in your script (player variables & triggers don't necessarily need to be nulled, only if that trigger is to be destroyed is it needed), you also only need to null a handle when it's set to something (the timer in the main function)
- Your code is very compressed, I'd suggest spacing it out more to be more readable
- Please also list the GUI version in the trigger listings as I need to also go over that one if it is to be submitted with it
- Your filename should match your version number
 
Level 14
Joined
Jul 1, 2008
Messages
1,314
hey Tank-Commander, thank you for this review and your time!! :) and again thanks to everybody else commenting!

As I am currently working a lot on a map of mine, I dont really have the time to include all your suggestions atm., and I was a bit undecided of what to do as well. I will not forget this and will upgrade it later, but you may graveyard it 'till then, if you need to. :)
 
Top