Practical guide

Submit and observe a normal command

Turn a logical UI action into validated fixed-tick intent and report completion without bypassing the owning game service.

Procedure

  1. Query current owner revisions and stable target IDs immediately before submission.
  2. Submit the registered command ID and typed arguments through command.submit.
  3. Treat the accepted receipt as queued intent, not completed mutation.
  4. Subscribe to events.command.completed during initialization and treat its detached payload as post-commit evidence; edits affect only that callback-local copy.
  5. Handle validation, queue, budget, and owner rejection IDs without retry loops inside one callback.

Example

local receipt = command.submit(
    "command.actor.take-control",
    {
        actor_id = actor.actor_id,
        expected_actor_revision = actor.revision,
        expected_authority_revision = actor.authority_revision
    },
    1
)
local completion_subscription = events.listen(
    "events.command.completed",
    function(event)
        feedback = event.payload.command_id .. " completed"
    end
)

Constraints and recovery

Related symbols

Project references