EverambleGAME API / 1

CONTENT CONTRACT · VERSION 1

StructureSwitch

A switch: a lever, a floor plate or a strike switch. Its placement's `variable` holds its state (1 active, 0 not) and its `open_prefab` is its active look; each change raises `switch_changed`.

Signature

{ duration_ticks: (PositiveTicks)?, mode: SwitchMode, pressed_by: (SwitchPressedBy)?, sound: (AudioCueId)?, trigger: SwitchTrigger }

Fields

NameTypeMeaning
duration_ticksPositiveTicksHold mode: a lever or strike switch stays active this long after each actuation (required there); a plate stays active this long after it is released (absent: releases at once). Absent in other modes.
Range: 1…2147483647; Unit: tick
modeSwitchModeHow it answers being actuated.
pressed_bySwitchPressedByFor a plate: what presses it. Required for plates, absent otherwise.
soundAudioCueIdSound played at the switch whenever it turns active; absent: silent.
Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: audio_cue
triggerSwitchTriggerWhat actuates it.