Skip to content

SwitchStateCondition ​

Inherits: EntityCondition < Condition < Resource

Check if a switch is in the desired state Evaluates switch-specific conditions like ON/OFF state

Properties ​

intinteractable_unique_id0
SwitchInteraction.SwitchStatedesired_stateSwitchInteraction.SwitchState.ON
boolmust_be_accessibletrue

Methods ​

boolevaluate( argument: Variant = null )
Stringget_description()
Stringget_function_description()

Property descriptions ​

Target

int interactable_unique_id = 0 ​

The unique ID of the switch to check

State Checks

SwitchInteraction.SwitchState desired_state = SwitchInteraction.SwitchState.ON ​

Desired switch state (true = ON, false = OFF)

bool must_be_accessible = true ​

Whether the switch must be accessible (not locked)

Method descriptions ​

bool evaluate( argument: Variant = null ) ​

Is the condition met?

String get_description() ​

A short text about what the condition checks.

String get_function_description() ​

The sentence the editor shows for the condition, with {placeholders} for its values.