Hello,
I am using your Quest Machine along with the Dialogue System. I am trying to implement a common scenario where you talk to an NPC, who gives you a sub-quest. If you accept it, say Node 2 gets activated, if you do not accept it (dialogue choice), Node 3 gets activated.
Also note that if you go to the Node 2 route, you will eventually get the option to activate Node 3. So Node 2 - Node 2.1 - Node 2.3 etc is an optional branching.
example -> Talk to Tom the Trader -> (Trader asks you to inspect tree) -> [you agree -> (examine tree) -> (go back to tom/success) -> Go talk to Mayor -> next sub quests]; ->[you disagree -> Go talk to Mayor -> next sub quests]
How can I implement this? It seems all child Nodes automatically get activated when the parent node is set to true.
Let me know if this makes sense or if you need more information on this. Note that I want this to write under a single quest using quest nodes.
Branching Logic Implementation
Re: Branching Logic Implementation
Hi,
Without the Dialogue System, you'd normally set up the quest like this:
When the quest starts, two nodes will be active: Accept Task 1 and Decline Task 1.
If you haven't watched the Dialogue System + Quest Machine + Love/Hate video series, you might find it helpful. Only the last video covers Love/Hate. The others cover Quest Machine + Dialogue System. It's a good supplement to the Quest Machine + Dialogue System Integration Overview video.
That's correct. That's the primary rule: when a parent becomes true, its children automatically become active.
Without the Dialogue System, you'd normally set up the quest like this:
When the quest starts, two nodes will be active: Accept Task 1 and Decline Task 1.
- Accept Task 1 has a condition that the player accepts task 1. If so, Accept Task 1 becomes true, and Complete Task 1 becomes active.
- When the player completes task 1, Complete Task 1 becomes true, and Offer Task 2 becomes active.
- If the player declines, Decline Task 1 becomes true, and Offer Task 2 immediately becomes active.
If you haven't watched the Dialogue System + Quest Machine + Love/Hate video series, you might find it helpful. Only the last video covers Love/Hate. The others cover Quest Machine + Dialogue System. It's a good supplement to the Quest Machine + Dialogue System Integration Overview video.
Re: Branching Logic Implementation
Thanks that looks good!
Re: Branching Logic Implementation
Glad to help!