No-code actions
Trigger devices and click sounds, for creators who don't write Verse.
Every element can trigger devices of your island, without a line of Verse: a teleporter, an item granter, a door, a music player. Each element has three lists of trigger devices:
| List | Runs when |
|---|---|
OnClick | The element is clicked. For a slider: when fire is released. |
WhenOn | A toggle switches On, or a choice or tab gets selected. |
WhenOff | A toggle switches Off, or a choice or tab loses the selection. |
The player who clicked is the instigator of the triggers, so a device set to act on its instigator acts on that player.
Only clicks run the lists: a state changed from Verse (SetOn, SetValue) runs none.
With the online editor
- In the inspector, open Devices (no code) and turn on Trigger device lists for each element that needs devices.
- The layout then gets
@editablelists named after the element:Buy_OnClick,Music_WhenOn,Music_WhenOff… - After building the Verse code, select the widget entity: the lists appear on the layout component in the Details panel. Add your trigger devices to them.
The option is off by default, so a layout made for Verse has no device lists.
With the Elements list
The elements you add to the Elements list of interactive_widget_component have the same three lists in their
Devices (no code) category.
Click sounds
ClickSounds on interactive_widget_component takes Audio Player devices. Each click plays them for the player who
clicked: set the Audio Player to be heard by its instigator.