Page 1 of 1

Script / Condition - Order of Operations

Posted: Fri Sep 18, 2020 6:04 pm
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.

Re: Script / Condition - Order of Operations

Posted: Fri Sep 18, 2020 9:04 pm
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.

Re: Script / Condition - Order of Operations

Posted: Fri Sep 18, 2020 9:51 pm
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!