Page 1 of 1
[SOLVED] Player Reward Branching
Posted: Tue Nov 10, 2020 7:05 am
by mschoenhals
I have a player quest (a timer quest) where the player may choose 1 of 2 rewards (items) after succeeding. I'm using both Dialogue System and Quest System. I've already written the give item script which works perfectly with Quest System.
How would I setup the branching logic so that the player can choose one of two options for reward from the quest giver after successfully completing the quest? I don't want the player to have the ability to go back to the quest giver and get the second item though. It would be nice to have it happen through the quest giver dialogue if possible.
Thanks in advance.
Re: [HELP] Player Reward Branching
Posted: Tue Nov 10, 2020 7:54 am
by Tony Li
Hi,
For reward branching in Quest Machine, please see the Demo's Pesky Rabbits quest. In the Return to NPC node's Active state, the Dialogue Text content includes two buttons: accept 5 coins or 2 carrots as a reward. You can set your quest up similarly, and configure the buttons' actions to use your give item script.
To show the Quest Machine dialogue UI, don't include any Dialogue System Conversation quest content items in the node's Dialogue Text. If Quest Machine does not find any Dialogue System Conversation quest content for the current quest state, it will use its own dialogue UI instead of starting a Dialogue System conversation.
Re: [HELP] Player Reward Branching
Posted: Tue Nov 10, 2020 8:59 am
by mschoenhals
Thanks for the reply Tony.
It works somewhat in that I now get a pop up where I can select the reward but, I can select both rewards numerous times (until I close the window). How do I limit the choice to just one of the two items?
Re: [HELP] Player Reward Branching
Posted: Tue Nov 10, 2020 9:32 am
by Tony Li
Hi,
Inspect each Button content and tick 'Group Selection'. Then set the same Group Number (e.g., 0). When buttons are in a group selection, you can only click one. Once you've clicked it, its actions run, and the group's buttons become non-interactive.
Re: [HELP] Player Reward Branching
Posted: Thu Nov 12, 2020 8:35 pm
by mschoenhals
Hi Tony,
Just letting you know that this worked out great. Thanks for your help.
Re: [SOLVED] Player Reward Branching
Posted: Thu Nov 12, 2020 8:42 pm
by Tony Li
Awesome! Happy to help.