Jump to content

StartCutScene() and CutSceneId()


zefklop

Recommended Posts

Posted

Once again, the gemRB team requires your help!

 

We have a strange bug in gemRB, where in BG1, in the first cutscene, player1 gets killed by the ogre who totally ignore the order given in the cutscene script. (in fact he don't, but player1 get killed before)

 

So the questions is: how does the cutscene take precedence over the ogre script?

 

Does CutsceneId(target) clear all target's actions? (this would be the most simple thing)

Does StartCutScene("cutscene") freeze all other scripts than cutscene.bcs ?

 

Any other idea that we did not think about?

 

Thank you!

Posted

The latter, I believe.

 

All I think CutSceneID() does it specify who's "running" the cutscene so you don't need to use shitloads of ActionOverrides().

Posted
Does CutsceneId(target) clear all target's actions? (this would be the most simple thing)

Does StartCutScene("cutscene") freeze all other scripts than cutscene.bcs ?

CutsceneId is a NOP for the engine. You can use any other action instead, which has the prefered target as the second object parameter (in bcs).

 

When StartCutScene is invoked, it first loads the script. Then it iterates over every block, removes the first action from the first response and uses object2 of that action to determine the target for this block. Afterwards it sends a InsertResponse message to the target with the rest of the response as data.

InsertResponse prepends an SetInterrupt(false) and appends an SetInterrupt(true) to the response and adds all actions to the action queue of the target.

Posted

Here are my findings :

StartCutSceneMode seems to freeze ALL scripts, even those who are not involved in the Cutscene.

StartCutscene and CutsceneId are a NOP from a script POV, these are just a way to make easy scripting.

 

Action Queues are NOT cleared by any of those calls. (on that point, gemRB is correct)

Posted

Finally answering to myself (hence double post), after some fights against weidu.

 

The work on which those observations are made is available here:

on sourceforge tracker on BG1.

 

First :

CutSceneId is almost a NOP. In fact, Myslef is nobody until it is called. If there are some actions proceeded in the action block before it is called, myself is Player1, whatever the argument of CutSceneId is...

 

Second: Actions added in a CutsceneId context are added to the actor's queue, no interruption there. And they don't seem to be interrupted at all, as said before in a more technical way!

 

Third: I still don't know which one of startcutscene and startcutscenemode freezes scripts processing. This will be tested later.

Posted
Third: I still don't know which one of startcutscene and startcutscenemode freezes scripts processing. This will be tested later.

 

It's StartCutSceneMode, as expected.

 

Also, area scripts still run during cutscenes, at least in bg1 (see ar2631 for an example of where this is important to know). Still need to look at whether this is the case for other games or other objects (doors, regions, etc).

Posted

If i recall correctly, trap scripts (infopoints) don't run in cutscenes.

I'm sure i seen confused pcs walking through traps in cutscene mode, unharmed.

Posted

Yeah, but BG/TotSC cutscene was different from BG2 (where in BG2, cutscene takes over everything). Maybe traps don't run there either, but I wouldn't suspect it solely because it works that way in BG2.

 

Since you bring traps up, remember the engines only send Opened() and Entered() events if the Is trapped toggle is set (in addition to flagging whether a detectable trap has been disarmed or not). The scripts always run, but those triggers will never fire when the toggle flips off (BG2's IsOverMe() runs without it; I think those are the only two, or at least the only useful two). (Known, but I don't think I've ever said it anywhere?)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...