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.
[SOLVED] Player Reward Branching
-
- Posts: 118
- Joined: Thu Dec 19, 2019 7:38 am
[SOLVED] Player Reward Branching
Last edited by mschoenhals on Thu Nov 12, 2020 8:35 pm, edited 2 times in total.
Re: [HELP] Player Reward Branching
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.
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.
-
- Posts: 118
- Joined: Thu Dec 19, 2019 7:38 am
Re: [HELP] Player Reward Branching
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?
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
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.
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.
-
- Posts: 118
- Joined: Thu Dec 19, 2019 7:38 am
Re: [HELP] Player Reward Branching
Hi Tony,
Just letting you know that this worked out great. Thanks for your help.
Just letting you know that this worked out great. Thanks for your help.
Re: [SOLVED] Player Reward Branching
Awesome! Happy to help.