LUIDA Docs
ReferenceActions

Actions

Every predefined state-listening action exposed by the LUIDA experiment-automation editor, organized by category. Same actions are available in per-state cells and in always-on event handlers.

These pages are not yet fully reviewed. The LUIDA team is continuing to review and improve them. If you find anything wrong on these pages, or have questions that aren't resolved by reading them, please ask or report to the LUIDA team.

The 25 predefined actions you can attach to a state-listening item, grouped by category. Each links to its detailed page with parameters, side effects, examples, and cross-references.

If a behavior you want isn't here, write a Customized Action — a code block with full ClusterScript access.

Where actions fire

The same action library is reused across two contexts on every state-listening item:

  • Per-state lifecycle slotsOn State Start, During State, On State Exit, configured cell-by-cell in the grid.
  • Always-on event handlersStart, Update, $.onCollide, $.onInteract, $.onUse, $.onGrab, $.onPhysicsUpdate, $.onRide, $.onSteer, $.onSteerAdditionalAxis, $.onTextInput. Each event hosts one action list (no enter/during/exit split); attach via the + Add event ▾ dropdown on the State-listening Items grid.

The Sleep action is the one exception — it's hidden from the event-handler menus because its { type: "sleep" } form is only meaningful inside the per-state action loop.

Globals available inside actions

Every action runs in a context with three globals readable:

  • CONDITION — current trial's variable values.
  • PARTICIPANTS — array of participant handles, 1-indexed.
  • COLLECTED_DATA — current data scratchpad (most useful inside data calculator scripts).

Inside Start event handlers specifically, LUIDA auto-prepends a prelude that primes CONDITION and PARTICIPANTS so conditional actions work from the first frame (otherwise Start would run before $.onUpdate populates them).

State machine control

  • ToNextState() — Triggers a transition to the next experiment state.

Item visibility

Child visibility

Item manipulation

Child manipulation

Data logging

The editor labels these as Push data to collector, Save pushed data in collector, and Upload saved data from collector — the runtime function names below are kept for backward compat. The same three signals (luida_collect_<label>, exp_recordCustomData, exp_uploadCustomData) are also exposed as the three phase toggles on the LuidaDataCollectionGimmick CCK component if you want to fire them from a CCK trigger instead of from an action list. See Configure data collector for the visual builder that defines what each "Save" snapshot looks like.

User feedback & utilities

Avatar management

Conditional execution

Any action can be wrapped in a condition that gates it on a CONDITION variable's value. The editor's "if" toggle on each listener row turns:

ShowItem();

into:

if (CONDITION["difficulty"] === "hard") {
  ShowItem();
}

Useful for showing/hiding stimuli per condition without writing a Customized Action. Available on every action row — both in per-state cells and inside always-on event handlers.

See also