Page 1 of 1

How to use the Interacting Entity as the Quest Giver?

Posted: Tue Sep 03, 2024 7:31 pm
by SysOp
Hello!

Let's say I am trying to have multiple shopkeepers. Dialogue System has a way to find the current entity by using

Code: Select all

[var=Conversant]
if not mistaken.

So I want them to give all shopkeepers the same quests, after some conversation is finished. The problem is that Dialogue System uses

Code: Select all

GiveQuest("Shopkeeper", "harvestCarrots")
, and actually needs an actor Shopkeeper as a param ?

Is there a method to do something like

Code: Select all

GiveQuest(var=Conversant, "harvestCarrots")
so I can reuse the quests and dialogs? Thank you!

Re: How to use the Interacting Entity as the Quest Giver?

Posted: Tue Sep 03, 2024 8:14 pm
by Tony Li
Hi,

Try:

Code: Select all

GiveQuest(Variable["Conversant"], "harvestCarrots")
This will find the Quest Giver whose ID matches the conversant's Display Name (or Name if no Display Name) and give that Quest Giver's harvestCarrots quest to the player.

Re: How to use the Interacting Entity as the Quest Giver?

Posted: Wed Sep 04, 2024 7:38 pm
by SysOp
I had to remove all references of the actor, in order to work, but the end result is as expected, thank you! :D

Re: How to use the Interacting Entity as the Quest Giver?

Posted: Wed Sep 04, 2024 7:53 pm
by Tony Li
Hi,

I'm not sure why you had to remove actor references (see the Logging & Debugging Tips video to check which GameObjects are being used as actor & conversant), but anyway I'm glad you got it working the way you want!

Re: How to use the Interacting Entity as the Quest Giver?

Posted: Thu Sep 05, 2024 2:21 am
by SysOp
Ah, I just simply had to remove any references to 'Villager' (it was called like that on my setup), deleting it's name basically from different fields. Otherwise it wouldn't give me the quest. Here's the result, same quest, different givers: