Click UI outside the passage
click_uiClicks dialogs, sidebar buttons, menus by ref, CSS selector, or visible text in Twine games, including label-based options. Returns updated observation; use choose() for numbered passage choices.
Instructions
Click dialogs, sidebar buttons and menus (SAVES, OPTIONS, ModLoader banner, modal buttons) by ref, CSS selector or visible text. Text matching covers -based controls too (SugarCube radio/checkbox options like "Jet black" or "Punch"); shortest match wins, exact=true for exact text. Returns the new observation (text; format:"json" for JSON). Use choose() for numbered passage choices and dialog buttons.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | UI ref from an observation (e.g. "u1" or "x3"). | |
| text | No | Visible text of the target (case-insensitive, partial match; the shortest match wins). | |
| exact | No | Require an exact text match (default false). | |
| format | No | Output format: "text" (default, human-readable) or "json" (JSON string for programmatic use). | |
| game_id | Yes | Session id returned by open_game. | |
| selector | No | CSS selector, if you know the exact element. |