Skip to content

Visual logic

Visual logic is persisted as event handlers and compiled to the same typed instruction format used by the controlled runtime. It cannot access browser APIs, the network, files, secrets, or dynamic code evaluation.

Events

The starter editor exposes player_touched for sensor entities. The handler runs when an active player overlaps that sensor.

Conditions and actions

The minimal graph model supports:

  • Set a typed variable.
  • Compare a variable with a value and run nested actions when equal.
  • Add a finite amount to the Rift score.
  • Play a named presentation effect.
  • Destroy the current entity.

The default collectible uses if collected equals false, then sets collected true, adds score, plays an effect, and destroys itself. The guard makes repeated overlap deterministic.

Budgets and errors

Each handler has bounded instructions, stack values, capability commands, and memory. Publish validation executes every handler with those limits before simulating the project. An infinite jump, stack underflow, wrong action argument, or budget overflow fails safely with a source-linked diagnostic.

See the generated capability reference for every action that can affect runtime state.

PixelRifts creator documentation · generated reference · protocol 21