Logic: Triggers
Triggers start execution — they have no exec input and fire on events. Every node below is rendered exactly as it appears on the Logic canvas, pre-filled with a realistic example. All of them may appear any number of times per graph.
On Click onClick
Fires when the player clicks the chosen element. The Button filter separates left and right click — put two On Click nodes on the same element to give it two different behaviors (buy on left, preview on right).
The element must have Players can click it enabled — the picker only lists valid targets.
On Hover Enter onHoverEnter
Fires the moment the cursor enters the element. Pair with Play Sound for hover blips or Set Element Visible to reveal tooltips you built as hidden groups.
On Hover Exit onHoverExit
The mirror of Hover Enter — fires when the cursor leaves. Use it to hide what Enter revealed, or to Reset Transform after a hover animation driven from logic.
On Screen Open onOpen
Fires once every time this screen opens — your setup hook. Typical chain: set initial texts from placeholders, hide confirm dialogs, play an open sound, kick off entrance animations.
On Screen Close onClose
Fires when the screen closes, whatever the reason — close button, damage, admin stop, quit. Save state with Set Variable here; session variables die right after this runs.
On Toggle Changed onToggle
Fires when a toggle or checkbox flips, with the new State as a bool output. Feed it into a Branch for on/off paths, or straight into Set Variable to persist a setting.
On Slider Changed onSlider
Fires while a slider (or scrollbar) is dragged; Value is 0–1. Multiply with Math to map onto your real range — e.g. ×100 for a percentage the player sees live via Set Element Text.
On Tab Switched onTab
Fires when a tab view changes page, with the new page Index (0-based). Use it to lazy-refresh the content of the page that just became visible instead of updating all tabs on a timer.
On Input onInput
Fires when the player confirms a value in an Input box (anvil or chat). Value is the typed text. Combine with Compare for validation, or pass it into a command: the same value is also available anywhere as %nxgui_<key>%.
Every X Seconds onTimer
Repeats while the screen is open — clocks, live stats, ambient pulses. It stops automatically on close.
Keep intervals ≥ 2–5 s for polling; for one label prefer this + Set Element Text over cranking the whole screen's placeholder refresh.