Script / Condition - Order of Operations

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Script / Condition - Order of Operations

Post by VoodooDetective »

I was just wondering, does a script execute even if the condition for that node is false?
Is that true for Group nodes too? It seems to me like the script is being executed even if the condition is false for my Group nodes.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Script / Condition - Order of Operations

Post by Tony Li »

Hi,

The Script executes when the node is "used."

For non-group nodes, that means when it's shown as a subtitle or selected as a response menu button.

Group nodes act as passthroughs. If evaluation gets to a group node and the Conditions are true, it executes the Script and passes through to its children, which can then check their Conditions and so on.
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Re: Script / Condition - Order of Operations

Post by VoodooDetective »

Oh strange, I could have sworn I was seeing behavior where group nodes whose conditions evaluated to false were executing the scripts anyways. Unfortunately, I completely rewrote that dialogue to simplify the tree so I don't have an example. It must have been my mistake. Thanks for confirming!
Post Reply