Larian Banner
Previous Thread
Next Thread
Print Thread
Making dead NPC clickable for dialog and quest #623822
30/09/17 12:51 AM
30/09/17 12:51 AM
Joined: Sep 2017
Posts: 4
G
Garou24 Offline OP
stranger
Garou24  Offline OP
stranger
G

Joined: Sep 2017
Posts: 4
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.

Re: Making dead NPC clickable for dialog and quest [Re: Garou24] #628321
08/10/17 05:09 PM
08/10/17 05:09 PM
Joined: Mar 2016
Posts: 500
Belgium
T
Tinkerer Offline

addict
Tinkerer  Offline

addict
T

Joined: Mar 2016
Posts: 500
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);


Powered by UBB.threads™ PHP Forum Software 7.6.2