Page 1 of 1

Giving Quest to Player from Dialogue Conversation

Posted: Fri Sep 16, 2022 12:48 pm
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!

Re: Giving Quest to Player from Dialogue Conversation

Posted: Fri Sep 16, 2022 1:21 pm
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.

Re: Giving Quest to Player from Dialogue Conversation

Posted: Fri Sep 16, 2022 2:32 pm
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!

Re: Giving Quest to Player from Dialogue Conversation

Posted: Fri Sep 16, 2022 3:42 pm
by Tony Li
Glad to help!