Conditions: If node available

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Caidran
Posts: 20
Joined: Wed Jan 03, 2018 5:02 pm

Conditions: If node available

Post by Caidran »

Hello,

Hopefully this is a nice easy one :)

I was wondering if there is a built in condition to check if specific nodes are available, or if any nodes are available.

Node 1 -> Node 2 [condition: has available nodes] -> Node 3, 4 and 5 [condition: all have different conditions]

So I would like Node 2 to only be available as an option if it actually has nodes 3, 4 or 5 available.

If it isn't an option then I'll have a think about how to build these kind of conversations.

Cheers
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conditions: If node available

Post by Tony Li »

Hi,

Unless you can take advantage of group nodes in some way that I'm not thinking of right now (sorry, it's been a long day), then the typical way to implement this is to put the same conditions on Node 2. For example:
  • [1] NPC: "Do you have any leads, detective?"
    • [2] Player: "Yes."
      Conditions: Variable["metAdam"] or Variable["metBob"] or Variable["metCarl"]
      (Link priority: AboveNormal)
      • [3] Player: "I suspect Adam."
        Conditions: Variable["metAdam"]
      • [4] Player: "I suspect Bob."
        Conditions: Variable["metBob"]
      • [5] Player: "I suspect Carl."
        Conditions: Variable["metCarl"]
      [6] Player: "No leads yet."
By setting Node 2's link priority to AboveNormal, the Dialogue System will check it before checking Node 6. If the Conditions are true, it will stop and use Node 2.
Caidran
Posts: 20
Joined: Wed Jan 03, 2018 5:02 pm

Re: Conditions: If node available

Post by Caidran »

Thanks Tony.

I think I had just been staring at things too long, adding all of the conditions for all of the nodes after the initial conditional node is not a problem and a simple solution. Works as expected. :)

Cheers
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conditions: If node available

Post by Tony Li »

Great! Glad to help.
Post Reply