In this article
To assist in the scripting process for Condition nodes, you can convert UI conditions into expressions. You can generate the expression from a previously created set of UI-based conditions, and you can then adjust the expression. You can also use the condition builder to help create new expressions, which will be useful when you can’t remember the exact expression or the codes that you need to base your expression on.
Note: When you click Generate expression, the conditions will not be removed as you may want to revert your decision. However as has always been the case the expression will take precedence over any UI-based conditions.
To convert a condition into an expression:
- Open the condition and go to the Expression tab.
- Click Generate expression.
- To edit the generated expression using the condition builder, click the button.
- Click Insert expression to add the new conditions to the expression.
Figure 1 - Generating the expression from the existing condition
The expression is generated in the expression field, and the button changes to Open condition builder so you can more easily edit the expression.
Figure 2 - The expression
The condition builder overlay opens.
Figure 3 - The condition builder overlay
You can now add further conditions to the expression as necessary.
Figure 4 - The complete expression