OPX//77
opx_infinitytarget

Events

Last updated on

Local events and page channels of the target module.

The module listens to opx:on:downed:changed: the eye closes and will not open while the player is down.

opx:on:target:opened

Client, local. The eye opened.

AddEventHandler('opx:on:target:opened', function(info) end)
  • info: table — { handle }

opx:on:target:closed

Client, local. The eye closed.

AddEventHandler('opx:on:target:closed', function(reason) end)
  • reason: string — e.g. selected, cancelled, input_released, target_changed, player_down, provider_disabled, provider_closed, no_surface, payload_refused, controls_unavailable, option_unavailable, module_stopped

opx:on:target:selected

Client, local. A row was chosen, just before its onSelect runs.

AddEventHandler('opx:on:target:selected', function(context) end)

Page channels

On the interactive surface. Every message carries the handle of the current open; others are ignored.

ChannelDirectionPayloadMeaning
target:hoverpage → Lua{ handle, x, y }Cursor moved (0–1 coordinates). Lua answers whether anything there has rows.
target:pickpage → Lua{ handle, x, y }Right-click at that point.
target:selectpage → Lua{ handle, token }A listed row was clicked.
target:cancelpage → Lua{ handle }Close the eye.
target:openLua → page{ handle, hoverMs, labels = { looking, unavailable } }Eye opened.
target:hoverLua → page{ handle, available }Something under the cursor has rows.
target:loadingLua → page{ handle, x, y }A pick is being resolved.
target:menuLua → page{ handle, x, y, options = { { token, label, description, group, icon, danger, checked } } }The rows to list.
target:emptyLua → page{ handle }Nothing to offer.
target:busyLua → page{ handle, token }A choice is being checked.
target:confirmLua → page{ handle, token, label }First click on a confirm row: relabel it label (Confirm: …); the next click on it runs.
target:errorLua → page{ handle }The choice no longer applies.
target:closeLua → page{ handle }Eye closed.

On this page