Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
I have a scenario where a child will join combat if he sees it happening, but when the adult he's fighting with is killed, he runs away scared to his mother. Afterwards, I want him to be reasonably scared of the players, but for some reason my dialog is overwritten by dialog I did not write asking for a gift in order to make everything OK again and which is totally inappropriate for a frightened child.

I have tried changing his alignment from the same as his father's to an ally; I've tried changing his default scripting; I've tried a couple different ways to enter combat*; none of it seems to make a difference.

Here's the code I'm currently using to make him run away:

---------------------------------------------------------

IF
CharacterKilledBy(CHARACTERGUID_Eldithas_Histerix_3347b77a-4b37-40e7-9e36-60caef04cbe8, _Character, _Character)
AND
CharacterIsPlayer(_Character, 1)
AND
CharacterIsInCombat(CHARACTERGUID_olofir_histerix_4b58b6fb-f628-4f73-9a3d-eaa0eef12d09, 1)
THEN
CharacterMoveToPosition(CHARACTERGUID_olofir_histerix_4b58b6fb-f628-4f73-9a3d-eaa0eef12d09, 25.858, 0.045, 67.123, 1, "scared_olofir");
DisplayText(CHARACTERGUID_olofir_histerix_4b58b6fb-f628-4f73-9a3d-eaa0eef12d09, "Aaaaaaaaaaaahhhhhhhh!!!!!!!");
SetCanJoinCombat(CHARACTERGUID_olofir_histerix_4b58b6fb-f628-4f73-9a3d-eaa0eef12d09, 0);

---------------------------------------------------------

Thanks in advance for any help anyone can offer. :)

* which I'm also having trouble with and I don't know if the two issues are related at all -- http://larian.com/forums/ubbthreads.php?ubb=showflat&Number=636451#Post636451

Joined: Oct 2017
Location: NH, USA
R
apprentice
Offline
apprentice
R
Joined: Oct 2017
Location: NH, USA
It sounds to me to be a character script or a behaviour script issue. From what you described, it seems like the NPC child has a default script left over from the template, which has to deal with responses to crimes, like killing his ally (at the time of the combat)

Try removing the crime-based scripts available to him, or edit some of your own if you still want him to respond to other crimes.


Projects: Tomb of Horrors: Tomb of Horrors
Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
How would I do that? I've edited his properties to change the scripts there and it did nothing. Is there another source of scripts that he's pulling from?

Joined: Oct 2017
Location: United Kingdom
journeyman
Offline
journeyman
Joined: Oct 2017
Location: United Kingdom
There's calls like ProcCharacterDisableAllCrimes(_Character) you could use maybe? Not tried though.

Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
The one you mentioned doesn't change anything. I also tried CrimeClearAll(), which doesn't even take any inputs so I figured it'd probably work if it was a crime-related thing, but that didn't do anything either. :(

Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
Branvex gave me the fix for this in another thread. Changing the child's faction with SetFaction() seems to have reset his reaction to me.

I had a feeling it had something to do with faction/alignment, but I couldn't find a call to change from hostile to friendly or neutral. Turns out the word I wanted was "faction." Doy.

Thank you for the help

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
You can also define DB_NoLowAttitudeDialog(CHARACTERGUID_ChildName_UUID), in which case that generic behaviour gets disabled.

Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
Sweet. Thanks! smile


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