Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#763195 07/03/21 01:07 PM
Joined: Jan 2021
Location: USA
D
stranger
OP Offline
stranger
D
Joined: Jan 2021
Location: USA
Hello, I am having trouble with the story editor, and the engine itself, trying to get a standard dummy to spawn and test out story scripts. About half the time, I get an origin character to spawn. Is there a way that the generic dummy/custom character can only spawn?


IF
CharacterEnteredTrigger(_char,S_Trigger_Bartender_Favor_3b7a884b-f98f-4a8b-8b2d-614d29eaff64)
THEN
DisplayText(Humans_Female_Bartender_d46b1a2c-16db-4558-83d1-1cfe4f41d822,"Hey, you! Come over here!");


If an origin character spawns, the "_char" (or player) will not work usually. Any tips for this situation. Thanks in advance.


G

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
Make sure you register the trigger using ProcTriggerRegisterForPlayers. Then it should work regardless of which player character is selected.

Joined: Jan 2021
Location: USA
D
stranger
OP Offline
stranger
D
Joined: Jan 2021
Location: USA
Thanks for the reply. Where do you register the trigger,? INIT or KB?

Also, would you have an idea on what I am doing wrong with the call Proc_CharacterSetTemporaryHostileRelation, using "_char" or "_player" is not valid? I'm guessing it's asking for the CharacterGUID, but how do you provide that GUID when you need to use test dummies in the engine?

Thanks for helping this girl out!

G

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
Originally Posted by D0rad01356
Thanks for the reply. Where do you register the trigger,? INIT or KB?
Wherever you want. If it should only become active at some point, you'd do it in KB when a certain rule triggers. If it should be active from the start, you can do it in INIT.

Quote
Also, would you have an idea on what I am doing wrong with the call Proc_CharacterSetTemporaryHostileRelation, using "_char" or "_player" is not valid? I'm guessing it's asking for the CharacterGUID, but how do you provide that GUID when you need to use test dummies in the engine?
Normally you set a (temporary) hostile relation in reaction to something the player character did. In that case, you can get a reference to the player character from that. E.g. if it's because of a dialogue choice, then set a character flag on the player in the dialogue and in general you would then react to the https://docs.larian.game/Osiris/API/ObjectFlagSet event.

However, hostility is a special case because characters that are in interactive dialogues can't be added to a combat (and you probably want it to happen after the combat finished anyway). So for that specific case you can use the existing "TemporaryHostilityAfterDialog" character flag that you can set on a player, and there is already story code that will then only trigger the hostility after the dialogue ends.

Quote
Thanks for helping this girl out!
You're welcome!


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