On this page

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

On Click×
Elementbuy_button
Buttonany ▾

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

On Hover Enter×
Elementnav_shop

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

On Hover Exit×
Elementnav_shop

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

On Screen Open×

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

On Screen Close×

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

On Toggle Changed×
State
Togglepvp_switch

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

On Slider Changed×
Value
Slidervolume

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

On Tab Switched×
Index
Tab viewshop_tabs

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

On Input×
Value
Input boxsearch_field

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

Every X Seconds×
Seconds5

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.

Pattern — live stat panel: Every X Seconds → Set Element Text, with a Placeholder node feeding the text pin. Prefer this over tiny refresh intervals when only some text needs updating.

Last updated July 11, 2026