Toggle
Provides a switch that can be toggled ON and OFF with the specified Key.
Type ID: origins:toggle
Note
To check if the power with this power type is toggled ON (or OFF), you can use the Power Active (Entity Condition Type) entity condition type.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
active_by_default |
Boolean | true |
Whether this power starts in the on or off state. |
key |
Key | {"key": "key.origins.primary_active"} |
Which active key this power should respond to. |
retain_state |
Boolean | true |
Whether this power switches back to default if the condition is no longer met. |
Examples
{
"type": "origins:toggle",
"active_by_default": false,
"key": {
"key": "key.use"
}
}
This example will provide a switch that is not active by default, and can be toggled with the key.use keybind.