Giving Quest to Player from Dialogue Conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

Giving Quest to Player from Dialogue Conversation

Post by mroshaw »

Hi!

I hope this finds you well!

I'm trying to give my player a Quest Machine Quest direct from a Dialogue System Conversation.

Within the conversation, I have a dialogue entry with an action and the following script:

Code: Select all

GiveQuest("Player", "my_dear_hunter")
However, when the dialogue entry is played out, the Player does not have the new Quest in their Journal. The Actor in the Conversations is a Dialogue System Quest Giver and has the "my_dear_hunter" quest in their Quest list. I have a Quest entry in Dialogue System database, and the name matches the Id of the Quest ("my_dear_hunter").

Am I using GiveQuest correctly? I tried to use GiveQuestToQuester:

Code: Select all

GiveQuestToQuester("Alissa", "my_dear_hunter", "Player");
But that doesn't work either.

I'm 100% sure that I'm doing something wrong, so any thoughts you might have would be greatly appreciated!

Thank you again!
User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: Giving Quest to Player from Dialogue Conversation

Post by Tony Li »

Hi,

I think you're close.
  • The first parameter is the ID of the Quest Giver.
  • The second parameter is the ID of the quest, which must be a quest in the Quest Giver NPC's Quests list.
  • The player should have a Quest Journal component.
If the Quest Giver NPC's ID is "Alissa" and the quest ID is "my_dear_hunter", this should work:

Code: Select all

GiveQuest("Alissa", "my_dear_hunter")
If not, but if the IDs look correct, check the Console window for warnings or errors.
mroshaw
Posts: 96
Joined: Wed Jan 19, 2022 4:10 am

Re: Giving Quest to Player from Dialogue Conversation

Post by mroshaw »

Thank you Tony!

I made a mistake in using the Actor name, rather than the Id. So using this (alissa_id) resolved the issue!

Thanks again, amazing stuff!
User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: Giving Quest to Player from Dialogue Conversation

Post by Tony Li »

Glad to help!
Post Reply