Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Oct 2020
sndwav Offline OP
stranger
OP Offline
stranger
Joined: Oct 2020
Hello,

We have a Game Master mod and we want to add a camera movement (kinda like a cinematic) using StartCameraSpline.
https://docs.larian.game/Osiris/API/StartCameraSpline

This is an Osiris call that we use in a Story Editor script.
In the INIT section, we wrote:
Code
StartCameraSpline(CameraSpline_000_a277cb26-f3b5-4e8a-9790-ad1a86c30e46, NULL, 3, 1, 1, 0)
When building the script we get an error:
Code
syntax error: "}" unexpected

Does anyone know what we are doing wrong?

In addition, we will be trying to use this script in a Game Master mod (on item use). Would that be possible?

If not, is there a way to add such camera movements in a Game Master mod?

Thank you.

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
You're missing a semicolon at the end of the line. The NULL also needs the null GUID after it.

However, it won't work in the INIT section. That one gets executed when Story gets initialised (*), which is before the level has even loaded, let alone before the presentation layer ("client") has been been initialised. You could try to use the https://docs.larian.game/Osiris/API/GameStarted event (in the KB section, not in INIT)
Code
IF
GameStarted("YourLevelName", 0)
THEN
StartCameraSpline(CameraSpline_000_a277cb26-f3b5-4e8a-9790-ad1a86c30e46, NULL_00000000-0000-0000-0000-000000000000, 3.0, 1, 1, 0);

If you want it to happen on item use, you can use https://docs.larian.game/Osiris/API/CharacterUsedItem :
Code
IF
CharacterUsedItem(_, YourItem_UUID)
THEN
StartCameraSpline(CameraSpline_000_a277cb26-f3b5-4e8a-9790-ad1a86c30e46, NULL_00000000-0000-0000-0000-000000000000, 3.0, 1, 1, 0);

I don't know how well that calls works/doesn't work in gamemaster mode. If it doesn't, I'm not aware of any alternative you could use.

(*) Unless it's in the init section of a story goal that's a child of another goal that completes when another event arrives, but that's probably not the case here. See https://docs.larian.game/Osiris_Overview#Goal_Initialisation_and_Completion and https://docs.larian.game/Osiris_Design_Patterns#Program_Initialisation for more details

Joined: Oct 2020
sndwav Offline OP
stranger
OP Offline
stranger
Joined: Oct 2020
It's working!
Thank you very much!


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5