Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Sep 2017
G
Garou24 Offline OP
stranger
OP Offline
stranger
G
Joined: Sep 2017
I am working on a quest and part of it requires finding a dead NPC. Clicking on the NPC starts a dialog with quest flags and journal updates. I can make this work with items, but have not figured out how to make it work with an NPC. Once I set the character state to dead_physical so that they have a blood puddle, they lose any option to start a dialog. I can not found any scripts yet that work and so far have been having to use triggers but they seem to clunky and do not allow me to from the quest and dialog flags as easily. Anyone have any thoughts on how I could make this work? Hopefully it is not something simple, but I am still learning the editor tool.

Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
I think you can do it, but it's a bit tricky. Note that the following is completely untested.

Code
IF
CharacterLootedCharacterCorpse(_Player,CHARACTERGUID_YourCharacter_GUID)
THEN
// Prevent corpse "inventory" from opening
DB_CustomUseItemResponse(_Player,CHARACTERGUID_YourCharacter_GUID,0);

IF
CharacterLootedCharacterCorpse(_Player,CHARACTERGUID_YourCharacter_GUID)
AND
CharacterIsDead(CHARACTERGUID_YourCharacter_GUID,1)
AND
// Not already in a dialog
IsSpeakerReserved(CHARACTERGUID_YourCharacter_GUID,0)
AND
StartDialog_Internal_NoDeadCheck("YourDialogName",CHARACTERGUID_YourCharacter_GUID,1,_Player,NULL_00000000-0000-0000-0000-000000000000,NULL_00000000-0000-0000-0000-000000000000,NULL_00000000-0000-0000-0000-000000000000,NULL_00000000-0000-0000-0000-000000000000,1)
THEN
// Dialog successfully started -> set same flags that are set when starting a dialog normally
Proc_DialogFlagSetup("YourDialogName",_Player,CHARACTERGUID_YourCharacter_GUID);
CharacterMakeStoryNpc(_Player,1);
DB_HasMetCharactersToCheck(_Speaker1,CHARACTERGUID_YourCharacter_GUID);


Moderated by  Larian_KVN 

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