Jump to content

StartCutSceneEx()


Salk

Recommended Posts

Hello!

Can someone tell me how StartCutSceneEx() works?

In BG EE I have this in capcut01:

IF
    True()
THEN
    RESPONSE #100
        CutSceneId(Player1)
        FadeToColor([30.0],0)
        Wait(1)
        LeaveAreaLUAPanic("AR0607","",[951.774],NE)  // Flaming Fist HQ, ground floor
        LeaveAreaLUA("AR0607","",[951.774],NE)  // Flaming Fist HQ, ground floor
        SetMasterArea("AR1100")  // SW Baldur's Gate (Flaming Fist HQ, Merchant League, Seven Suns)
        MultiPlayerSync()
        CreateCreature("FLAME3",[1143.891],N)  // Flaming Fist Mercenary
        CreateCreature("FLAME1",[800.742],E)  // Flaming Fist Mercenary
        CreateCreature("FLAME2",[932.831],NE)  // Flaming Fist Mercenary
        CreateCreature("FLAME4",[1060.668],SW)  // Flaming Fist Mercenary
        ActionOverride("FLAME4",SetDialog("flamc7"))
        ActionOverride("Chimp5",DestroySelf())
        ActionOverride("Fergus",DestroySelf())
        ActionOverride("DICKSMOK",SetNumTimesTalkedTo(1))
        MultiPlayerSync()
        StartCutSceneEx("Capcut03",TRUE)
END

...

and capcut03 is:

IF
    !InMyArea(Player3)
    !InMyArea(Player4)
THEN
    RESPONSE #100
        CutSceneId("FLAME1")  // Flaming Fist Mercenary
        JumpToPoint([678.857])
        Face(NE)
END

IF
    !InMyArea(Player2)
    !InMyArea(Player6)
THEN
    RESPONSE #100
        CutSceneId("FLAME3")  // Flaming Fist Mercenary
        JumpToPoint([1096.1001])
        Face(NWW)
END

IF
    True()
THEN
    RESPONSE #100
        CutSceneId(Player1)
        Wait(2)
        AdvanceTime(TWO_HOURS)
        FadeFromColor([30.0],0)
        Wait(4)
        CreateCreature("ANGELO",[924.598],S)  // Angelo
        Wait(2)
        ActionOverride("Angelo",MoveToPoint([1018.638]))
        ActionOverride("Angelo",FaceObject(Player1))
        Wait(1)
        ActionOverride("DICKSMOK",MoveToPoint([1238.723]))
        ActionOverride("DICKSMOK",FaceObject(Player1))
        Wait(2)
        EndCutSceneMode()
        ActionOverride("Flame4",StartDialogueNoSet(Player1))
END

What happens if instead of StartCutSceneEx("Capcut03",TRUE), I just use StartCutScene("Capcut03")?

Thanks!

 
Edited by Salk
Link to comment

From the IESDP:

Quote

This action starts a cutscene; a cinematic sequence that removes the GUI and player control. The cutscene parameter is the script name to run. The second variant can enable condition checking (trigger evaluation, off by default) when the second parameter is set to TRUE.

The example script is from cutscene BDCUT17B.bcs and shows how they can be reused. With StartCutSceneEx("BDCUT17B",TRUE) it executes only one script block depending on the specified conditions. With StartCutSceneEx("BDCUT17B",FALSE) it will execute both blocks regardless of condition.

The "Ex" variant adds a boolean parameter; if that parameter is TRUE, then you check the trigger conditions in the cutscene's block. If not, or if you use the basic StartCutScene version, conditions are not checked and all parts of the script are run.

Link to comment

I would only add that with TRUE all block are executed one after the other while in FALSE (default) variant they all executed "at once" (I'm not sure how this is exactly implemented but it seems like executed concurrently, "wait" in higher block not postpone execution of lower block). At least form my experience it seems to work like this.

***

Actually, this is probably not true what I just said. I usually used TRUE variant when every block has the same cutscene id, that's why I had impression that they execute one after the other. Maybe in default mode it also work that way.

Edited by marchitek
Link to comment

Ok, thank you.

I did read the IESDP entry but I am still not sure I understand how it works.

Capcut03 has 3 blocks. StartCutScene() would run all 3 of them at the same time and checks the triggers for each one. If true, the response triggers and if not, the block doesn't produce anything, correct? So block3 always triggers. Block1 triggers if Player3 and Player3 are not In the script caller's area. Block2 triggers if Player4 and Player5 are not In the script caller's area. That is, if I understand how StartCutScene() works.

How would StartCutSceneEx() change this dynamic?

Edited by Salk
Link to comment

StartCutScene() does not evaluate the triggers. All blocks get executed, no matter what.

Ascalons Breagar had a bug with a cutscene that contained two script blocks with different conditions. Only one should have been true when the cutscene was called. What happened for the "normal" cutscene call is that - despite the blocks having triggers - they were both executed, leading to a doubling of the granted weapon.

That's what the "StartCutSceneEx("cutscene",TRUE)" is for. The triggers in the script blocks inside the cutscene get evaluated and only the ones giving true will be executed.

For "StartCutSceneEx("cutscene",FALSE)", the triggers get ignored, meaning calling "StartCutSceneEx("cutscene",FALSE)" is the same as the normal "StartCutScene("cutscene")".

 

Link to comment

Oh let me see if I understand this correctly. With StartCutScene() it does not matter what triggers are in the IF section of the block, they behave like they were all True()?

If that is the case, I find it very weird and honestly unexpected. 

Unfortunately it seems the classic engine does not support StartCutSceneEx().

Link to comment

jastey,

maybe I can ask for your assistance again. Let's say that in a .D file I have the following:

IF ~~ THEN BEGIN 2
  SAY #15211
  IF ~~ THEN DO ~SetGlobal("Captured","GLOBAL",1)ClearAllActions()StartCutSceneMode()StartCutScene("Capcut01")~ UNSOLVED_JOURNAL #26844 EXIT
END

And let's say that for State 2 up there I want to add another response nearly identical to the existing one (I only want to have a response trigger and a different cutscene) so that it would end up like this:

IF ~~ THEN BEGIN 2
  SAY #15211
  IF ~~ THEN DO ~SetGlobal("Captured","GLOBAL",1)ClearAllActions()StartCutSceneMode()StartCutScene("Capcut01")~ UNSOLVED_JOURNAL #26844 EXIT
  IF ~!InMyArea(Player3)!InMyArea(Player4)~ THEN DO ~SetGlobal("Captured","GLOBAL",1)ClearAllActions()StartCutSceneMode()StartCutScene("Capcut08")~ UNSOLVED_JOURNAL #26844 EXIT
END

What WeiDU function should I use? COPY_TRANS? Could you help me figure this out?

Thanks.

Link to comment

To add the second transaction that would trigger if Player3 and Player4 are not in the area would be EXTEND_BOTTOM (inside a d-file):

EXTEND_BOTTOM dlgname 2
IF ~!InMyArea(Player3)!InMyArea(Player4)~ THEN DO ~SetGlobal("Captured","GLOBAL",1)ClearAllActions()StartCutSceneMode()StartCutScene("Capcut08")~ UNSOLVED_JOURNAL #26844 EXIT
END

"dlgname" being the name of the dlg the state is in.

This is one of the cases where I wouldn't know how to make this more compatible with regard to "what if a mod added setting of a variable here". My answer would be: your mod would need to be installed before such another mod.

COPY_TRANS copies all transactions of a state to another state.

Link to comment

Hello again.

If I may ask more about this StartCutScene() and StartCutSceneEx(), I have now noticed that in SCAR.DLG (BG EE) we have this:

SetGlobal("ScarMission","GLOBAL",99)
ClearAllActions()
StartCutSceneMode()
StartCutScene("Scarcut")

Here StartCutScene() is used as opposed to StartCutSceneEx(). But then I check starcut.bcs and the script does contain triggers in the first two blocks:

IF
    Global("BQDoor0606","GLOBAL",0)
THEN
    RESPONSE #100
        CutSceneId("Scar")  // Scar
        OpenDoor("DOOR0606")
        MoveToPoint([1487.1291])
        EscapeArea()
END

IF
    Global("BQDoor0606","GLOBAL",1)
THEN
    RESPONSE #100
        CutSceneId("Scar")  // Scar
        MoveToPoint([1487.1291])
        EscapeArea()
END

At this point, I am confused because from what I understood, those two scripts will ignore the triggers and run because the cutscene has been activated with StartCutScene("Scarcut") instead of StartCutSceneEx("Scarcut", TRUE) ?

Thanks.

 

 

Edited by Salk
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...