OPX//77
opx_infinityprogress

progress

Last updated on

A timed-action bar that holds the player still, optionally plays a gesture, and reports how it ended.

Shows a timed-action bar ("Eating", "Picking the lock") for a few seconds. While it runs the player cannot move or attack (when LOCK is on) and an optional animation plays. Only one bar runs at a time. Start answers at once whether the bar is up; the outcome arrives later on opx:on:progress:done. Server code starts a bar on one client through the server contract, and the server judges how it ended.

Sideboth (the bar is client-side; the server starts numbered bars and judges them)
Requiresnone
Optionaldowned, animations
Contractprogress v1 — client, server
Configconfig/progress.lua (shared)
Datanone

How a bar runs

  • The bar ends early if the player goes down, the character unloads or the module stops.
  • It never takes keyboard focus (it is drawn on the overlay surface).
  • While a bar is up and LOCK is true, the input actions Movement and Attack are blocked. The camera stays free.
  • A bar marked cancelable can be ended by the player with the cancel key (X by default); it ends cancelled. The page draws the hint progress.cancel ("{key} to cancel") naming the bound key. A bar not marked ignores the key.
  • X is shared with a call's decline and hang-up, a carried crate and the emote stop. While a cancelable bar is up it owns the press (rank PROGRESS, see One press, one owner): cancelling an eat or a repair during a call no longer ends the call. A press while chat or a form holds the keyboard does nothing.

Configuration

config/progress.lua sets OPX.Config.MODULES.progress.

KeyDefaultEffect
enabledtruefalse switches the module off.
LOCKtrueBlock Movement and Attack while a bar is up. false keeps the bar but lets the player walk away.
MIN_MS250Shortest duration accepted (valid 100–60000, else 250).
MAX_MS60000Longest duration accepted (valid 1000–600000, else 60000).
CANCEL_KEY{ ID = 'opx.progress.cancel', NAME = 'progress.key.cancel', DEFAULT = 'X' }The key that cancels a bar marked cancelable. Players rebind it in the pause menu under ID. DEFAULT = false declares no key: no bar can be cancelled by the player.

Refusal codes

CodeMeaning
invalid_callerowner is missing or empty.
invalid_specspec is not a table.
progress_busyAnother bar is already up.
invalid_durationdurationMs is outside MIN_MS..MAX_MS.
invalid_labellabel is missing or empty.
progress_not_activeStop with no bar up.
not_ownerStop by an owner that did not start the bar.

On this page