Reward After quest

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
turtleking4597
Posts: 2
Joined: Thu Oct 03, 2019 12:54 pm

Reward After quest

Post by turtleking4597 »

After watching the tutorial videos on Youtube, I was wondering if after finishing a quest it would be possible to add rewards? I have already created my own inventory system and money system prior to purchasing the product, and was wondering if its possible to give rewards after a quest completion to my own scripts?
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reward After quest

Post by Tony Li »

Sure! Typically the player will complete a quest by talking to an NPC. In this conversation, you'll use the Script field to set the quest state to success. You can use the same Script field give rewards. To do this, register your own script method(s) with Lua so you can call them in the Script field.

So the Script field might end up looking something like:

Code: Select all

SetQuestState("My Quest", "success);
GiveGold(50);
GiveItem("Magic Sword");
(Assuming you've registered script methods named GiveGold and GiveItem.)

More info:
turtleking4597
Posts: 2
Joined: Thu Oct 03, 2019 12:54 pm

Re: Reward After quest

Post by turtleking4597 »

Thank you so much!! After playing around with it, I got it to work with my own systems!.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reward After quest

Post by Tony Li »

Great! Glad to help.
Post Reply