Jump to content

[How-To] Using EE's "Skipit" Functionality for Mod Cutscenes


Recommended Posts

Using EE's "Skipit" Functionality for Mod Cutscenes

This is a How-To how to make cutscenes in a mod skippable.

Sometimes they are inevitable - cutscenes. The Enhanced Edition come with a really great feature - skippable cutscenes that end when the player hits the "Esc" button.

To provide this feature, cutscenes need to be prepared accordingly, and an extra "skipit" script has to be provided that closes the broken cutscenes. The EEs use the scripts cutskip1.bcs for BG1, cutskip.bcs for SoD, and cutskip2.bcs for BGII.

To use the functionality in your mod, define an own skipit script. In this example, I'll call it xxskipit.bcs.

To allow skipping of the cutscene, add the following into your cutscene starting from the moment you want to allow the player to skip the cutscene:

SetAreaScript("xxskipit",OVERRIDE)
SetGlobal("xx_CUTSCENE_BREAKABLE","GLOBAL",y)
SetCutSceneBreakable(TRUE)

With "xx_CUTSCENE_BREAKABLE" being your mod's breakable cutscene variable, and "y" being the active value of this cutscene for the skipit script xxskipit.bcs.

Before your cutscene ends - the screen fades to black and all temporary cres are cleaned up etc. - breakability of the cutscene need to be forbidden again by integrating:

SetCutSceneBreakable(FALSE)
SetGlobal("xx_CUTSCENE_BREAKABLE","GLOBAL",0)
SetAreaScript("",OVERRIDE)

Pressing the "Esc" button now will no longer have an effect while the cutscene plays out.

The script xxskipit.bcs contains first a scriptblock that disables skipping of cutscenes, resets your variable to 0, and lets the screen fade to black. The second scriptblock executes the commands for the variable value that was set in the skipped cutscene. As an example:

IF
    CutSceneBroken()
THEN
    RESPONSE #100
        SetCutSceneBreakable(FALSE)
        StartCutSceneMode()
        ClearAllActions()
        FadeToColor([0.0],0)
        SetCursorState(FALSE)
        SetAreaScript("",OVERRIDE)
        SetGlobal("xx_CUTSCENE_BREAKABLE","GLOBAL",0)
        Continue()
END

IF
    CutSceneBroken()
    Switch("xx_CUTSCENE_BREAKABLE","GLOBAL")
THEN
    RESPONSE #1
        //put the commands to clean up the cutscene for the value "1" here
    RESPONSE #2
        //put the commands to clean up another cutscene for the value "2" here
.. etc.
END

And that's all you need. The crucial part is to decide from where until where a cutscene should be skippable so no unwanted leftovers might remain in other areas etc.

 

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...