Page 1 of 1

Conditions: If node available

Posted: Wed Feb 07, 2018 1:09 pm
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

Re: Conditions: If node available

Posted: Wed Feb 07, 2018 4:04 pm
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.

Re: Conditions: If node available

Posted: Thu Feb 08, 2018 5:28 am
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

Re: Conditions: If node available

Posted: Thu Feb 08, 2018 8:16 am
by Tony Li
Great! Glad to help.