Can't accept quest within dialog

Announcements, support questions, and discussion for Quest Machine.
Post Reply
junwi21
Posts: 35
Joined: Wed Jan 27, 2021 12:18 am

Can't accept quest within dialog

Post by junwi21 »

I have a custom dialog ui prefab / script that im using.

I try calling questGiver.GiveQuestToQuester(quest, questGiver.id); when the accept button is pressed, however when i continue the conversation with the NPC, the quest is still not marked as active (the conversation should branch depending on whether or not the quest was accepted.

However, when i talk to the NPC again right after, the check for the quest marked active is true as he gives the dialog he's supposed to give when the player has accepted the quest.

Why is the quest not being accepted immediately during the initial dialog?
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't accept quest within dialog

Post by Tony Li »

Hi,

If the conversation is checking the quest state in the very next node, please see: Conversations Evaluate Conditions One Extra Level Ahead.
junwi21
Posts: 35
Joined: Wed Jan 27, 2021 12:18 am

Re: Can't accept quest within dialog

Post by junwi21 »

Thanks, can you tell me why it's not being added to the player's quest journal though?
junwi21
Posts: 35
Joined: Wed Jan 27, 2021 12:18 am

Re: Can't accept quest within dialog

Post by junwi21 »

It's in the quest database and the questgiver's list
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Can't accept quest within dialog

Post by Tony Li »

Try specifying the quester (the player), not the quest giver, in QuestGiver.GiveQuestToQuester. For example:

Code: Select all

questGiver.GiveQuestToQuester(quest, payerQuestJournal.id);
If that doesn't fix it, check the Console window for any errors or warnings.
Post Reply