**Language / Langue :** [[fr:yaml:elements-cliquables|FR]] | **EN** ====== Clickable Elements ====== Clickable elements trigger an event from a word or picture placed inside the room text. ===== Text Syntax ===== text: "The {{lever:@pull_lever}} sticks out of the wall." events: - id: pull_lever do: "lever.=.1" text: "The lever drops with a dry click." once: true %%{{label:@event_id}}%% displays ''label'' as an interactive element. The event must belong to the current room. ===== Picture Syntax ===== text: "A slab shows this symbol: {{[[/scenarios/images/test/un.png]]:@slab_one}}" events: - id: slab_one do: "slab.=.1" text: "The slab lights up." Pictures use the same syntax, with the picture link as the label. ===== Conditions ===== The usual event fields work with clickable elements: ''if:'', ''visible-if:'', ''disabled-if:'', ''do:'', ''to:'', ''text:'' and ''once:''. * ''visible-if:'' false: the element becomes normal text or a normal picture. * ''disabled-if:'' true: the element remains visible but inactive. * ''once:'' works like it does on other events. For interactive help bubbles, see [[en:yaml:tooltips|Interactive tooltips]]. For drag-and-drop combinations, see [[en:yaml:drag-drop|Drag & drop]]. Clickable elements also work inside YAML frames/HUDs: they are rendered with current variables and refresh with the room. **Join us on [[https://discord.gg/Z63DtVV|discord Make&Play]]**