Jump to content

Transporting some of the characters

Recommended Posts

Cutscenes and just actions that transport the party somewhere assume that all of the characters are in the same place. Even if they are off in a building somewhere, they will be pulled from there to appear at the destination. And scripts like Garrick's walk in BG1 make the whole party follow to particular spots on the ground. I don't know how a cutscene like that would work if the party members were in a different area, perhaps they are teleported first, but I would like to know how to limit these moving mechanics to party members in the same area or even a small part of an area. Writing a check for every one wouldn't help, because it's obviously not sensible to make scripts for all the combinations. And I myself have made a mod that lets the party split up and adventure in different places on the world map. If they are somehow gathered from miles away and thrown on the same landing bay, that won't be good for suspension of disbelief.

This applies to transporting actions in dialogues, too. Let's say I have an encounter in a building (not a separate area, no "you must gather" to enter) that ends with all of the party members there being kicked out. Well, I can put LeaveAreaLUA actions there, but who should they include? It may be just one character who ventured inside, and then I could target LastTalkedToBy, but there may be others with him - or the full party. If I include them all just in case and they were somewhere completely different before, maybe even fighting, and now all appear before the door, that's going to be weird. The only idea I have is putting the action in the script of an invisible minion and throwing an area-of-effect spell on LastTalkedToBy, limited to PC. When the conversation ends, a minion will spring up for every party member there and transport him separately. This is going to come with a delay, though. Any other ideas?

Link to comment

Use StartCutsceneEx("cutscene",TRUE), it allows to evaluate conditions in script blocks.

Like, you can structure its blocks as:

1) Initial fadeout, etc.
2-7) If playerX is in area/range, move them to appropriate point
8) The rest of cutscene

You can also split the main body in parts and insert more party checks between those, i.e. for walking around, casting etc.

That's if you assign the same SetCutsceneID() object for all blocks, they'll be processed in sequence then.
If you have too many places where party presence check is important, you can make one composite block for each party member and assign it to themselves. Different IDs run their blocks simultaneously, although it may or may not be harder to time, so that they're not out of sync with the main cutscene action.

As for dialog actions, I think you're out of luck 🤔 You can launch StartCutsceneEx() at the exit transition, and maybe - just maybe - kick SecondNearest([PC]) out, but the latter will only work within visual range of performing actor.

Off the top of my head, the SoD's cutscene after the bridge explosion makes PC walk towards Caelar from any (unknown beforehand) place inside of the camp, and Caelar will wait exactly until PC reaches the position. I think the filename is bdcut16.bcs, or possibly 14, 15 or 17.

Edited by Ardanis
Link to comment

Hey, @Ardanis! You might want to know that the trick with using minions to transport characters individually works well enough, only the game crashes if the dispatch is between different master areas. Because the minion is not global, I think, and can't complete the operation when the PC flies out of the area.

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.

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...