Jump to content

Help with Eirik's Cut Scene


EiriktheScald

Recommended Posts

I'm working on a cut scene that triggers when the party first sees Eirik.

 

Firstly, 'FW2800.baf' file:

/*The Coast Way (Area FW2800), on the north edge of the road leading to the Friendly Arm Inn.*/
IF
Global("EirikExists","FW2800",0)
THEN
RESPONSE #100
SetGlobal("EirikExists","FW2800",1)
CreateCreature("eseirik",[XXXX.YYYY],3)
END

 

'eseirik.baf' file:

/*As the party approaches, Eirik is set upon by a wolf.*/
IF
  !InParty(Myself)
  See(PLAYER1)
  Global("NumTimesTalkedTo","GLOBAL",0)
THEN
  RESPONSE #100
  PlaySound("eshowl") /*The howling of wolves can be heard in the distance*/
  ClearAllActions()
  StartCutSceneMode()
  StartCutScene("escut01")
END

 

'escut01.baf' file:

IF
  True()
THEN
  RESPONSE #100
  CutSceneId("eseirik")
  SetDialog("escut01")
  Wait(2)
  CreateCreature("WOLF01",[XXXX.YYYY],3) /*Create wolf just outside of party's view*/
  ClearAllActions()
  StartCutScene("escut02")
END

 

'escut01.d' file:

BEGIN escut01

IF
  True()
THEN
  SAY ~Listen! The wind howls with wolf-voices, draw your blades!~
END

 

'escut02.baf' file:

IF
  True()
THEN
  RESPONSE #100
  CutSceneId("WOLF01")
  MoveToPoint([XXXX.YYYY]) /*Wolf moves in sight of party*/
END

IF
  True()
THEN
  RESPONSE #100
  CutSceneId("eseirik")
  SetDialog("escut02")
  Wait(2)
END

IF
  True()
THEN
  RESPONSE #100
  CutSceneId("WOLF01")
  Attack("eseirik")
END

IF
True()
THEN
  RESPONSE #100
  CutSceneId("eseirik")
  AttackNoSound("WOLF01")
  Wait(10)
  Kill("WOLF01")
  EndCutSceneMode()
END

 

'escut02.d' file:

BEGIN escut02

IF
  True()
THEN
SAY ~Flee hound! Though your belly be empty, flee if you value your wretched hide! Or I shall run you through!~
END

 

Is this the right approach? If not, please correct/advise. Thanks. :)

Link to comment

You may want some sort of MoveView*() action so that the player can actually see the character(s).

 

Don't ClearAllActions() inside the cutscene; once, just before first starting the cutscene, is sufficient.

 

NumTimesTalkedTo() isn't a variable (unless you're creating one for some reason).

 

You're running SetDialogue() twice, but there doesn't look to be any actual dialogue. If this is for Tutu or BG2, don't use SetDialogue(). Stick it all in the normal pre-join dialogue, and then run StartDialogueNoSet() when you actually want the character to speak.

 

Cutscene blocks are run concurrently, so your second cutscene doesn't make any sense (there can be only one "WOLF01" running one block during the cutscene).

 

Even if WOLF01 has a script name (CutSceneId() uses the character's script name), you might just want to stick to the trusty habit of CutSceneId(Player1) and then just ActionOverride() everybody else in the cutscene.

 

The dialogue could just be DisplayStringHead() -- cutscenes aren't as snazzy if you have to stop every two seconds for the dialogue screen.

Link to comment

Bear with me; I lifted this from the gorion cut scene without any knowledge of how scripting works. :rant:

 

I'm trying to script this set of actions between Eirik and the wolf that trigger when he sees the party approach, but before he joins the party. Maybe a cut scene isn't the best way? Now that I think of it, the party is already there, so why do I need to cut away... can I just issue these actions in Eirik's BAF or Dialog file?

Link to comment

You don't need to do this as a cutscene, but you may wish to. Because we are used to seeing any NPC who does anything more remarkable than a random walk do it in the context of a cutscene, the player is going to wonder why the heck the NPC is wandering all over the place talking to a wolf, if they notice it at all. They might not, believe it or not. There's something about having your PC unselectable that gets your attention. And, we're used to seeing cutscenes.

 

Think about Keldorn fighting the zombie in the sewers. IIRC, he's actually got a line or two before the party shows up, but most of the time, the party just waits for the autopause when the zombie shows up as an enemy.

 

You know, that's another place you might look for cutscene advice: Keldorn's joining sequence. There is no difference between Tutu and BG2 SoA as far as scripting goes, so it will apply.

Link to comment

Heh, I have no idea what his cutscene looks like since I've never played BG2. But it sounds like what I had in mind. I'll take a look at his files this evening. Thank you.

 

[Edit:]Oh, one thing that still puzzles me: string references. In order to display text you need to know the string ref. But aren't those assigned when you install the mod? How do you determine what the ref is afterwards?

Link to comment

You can start it using a function of See()

 

This would go in Eirik's script, not in the area script:

IF
 !InParty(Myself)
 See(Player1)
 Global("ESBigCutScene","GLOBAL",0) //ensures that it only plays once
THEN
  RESPONSE #100
  SetGlobal("ESBigCutScene","GLOBAL",1)
  PlaySound("eshowl") 
  ClearAllActions()
  StartCutSceneMode()
  StartCutScene("escut01")
END

Link to comment

This is from Keldorn's script:

IF

GlobalLT("ActiveKeldorn","LOCALS",2)

GlobalGT("BeholderPlot","GLOBAL",0)

AreaCheck("ar0701")

THEN

RESPONSE #100

SetGlobal("ActiveKeldorn","LOCALS",2)

Activate(Myself)

CreateCreatureObject("KELZOMB",Myself,0,0,0) // Zombie

END

 

IF

Dead("Kelzomb") // Zombie

See([PC])

NumTimesTalkedTo(0)

THEN

RESPONSE #100

StartDialogueNoSet([PC])

END

 

IF

!Dead("Kelzomb") // Zombie

See("Kelzomb")

Detect([PC])

THEN

RESPONSE #100

Attack("Kelzomb")

END

Link to comment

Archived

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

×
×
  • Create New...