Node Documentation

Switch Node

A switch node can be on or off. Switch this node using call edges or button nodes.

Overview

A switch node can be on or off. Switch this node using call edges or button nodes.

Category: Control

Tutorial: Start interactive node tutorial

Configurable properties

LabelPropertyTypeDefaultDescription
Labellabeltext""A text describing the switch. It is only shown in the graph.
Initial oninitialOncheckboxtrueShould the switch be initially on or off?
Reset if back in contextresetOnReentrycheckboxtrueThe switch should be reset to its initial state when it re-enters the context.

Initial states

StateInitial ValueDescription
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.

Callable methods

  • on() - Set the switch to on
  • off() - Set the switch to off
  • toggle() - Togle the switch
  • reset() - Resets the switch to its original state