A switch node can be on or off. Switch this node using call edges or button nodes.
A switch node can be on or off. Switch this node using call edges or button nodes.
Category: Control
Tutorial: Start interactive node tutorial
| Label | Property | Type | Default | Description |
|---|---|---|---|---|
| Label | label | text | "" | A text describing the switch. It is only shown in the graph. |
| Initial on | initialOn | checkbox | true | Should the switch be initially on or off? |
| Reset if back in context | resetOnReentry | checkbox | true | The switch should be reset to its initial state when it re-enters the context. |
| State | Initial Value | Description |
|---|---|---|
| on | "custom function" | true if the switch is on, otherwise false; Initial value can be configured. |
| off | "custom function" | false if the switch is on, otherwise true; Initial value can be configured. |
| value | "custom function" | 1 if the switch is on, 0 if the switch is off; Initial value can be configured. |
on() - Set the switch to onoff() - Set the switch to offtoggle() - Togle the switchreset() - Resets the switch to its original state