Built-in component reference
All built-ins register when src/game/components/index.js loads, in a fixed order. Component IDs are stable across scenes and blueprints — the engine persists them by ID, so existing scenes keep working as fields evolve.
Each component below lists its fields, actions (callable from Flow), conditions (checkable from Flow), events (Flow graph triggers), lifecycle hooks, and any cross-component dependencies. Fields marked hidden are internal and don't show in the inspector or Flow; fields marked output are read-only at runtime (engine-set state).
Browsing components in the editor
The Object Flow node picker lists every registered component — built-in plus your project components — grouped and sorted so attached ones float to the top.
Core
These components are on almost every object: rendering an image, moving it, and catching taps and drags.
Motion (motion)
Category: Core Description: Moves, tweens, springs, bounces, and smooths a Thing's transform.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
springStiffness | number | 0.18 | 0–1; spring follow stiffness |
springDamping | number | 0.68 | 0–1; spring follow damping |
dragStiffness | number | 0.52 | 0–1; stiffness while being dragged |
dragDamping | number | 0.58 | 0–1; damping while being dragged |
scaleSmoothing | number | 10 | 0 disables smoothing |
rotationSmoothing | number | 8 | 0 disables smoothing |
Actions
| Action | Params | Behavior |
|---|---|---|
Move To | x, y, durationMs, easing | Tween position to (x, y) over durationMs. |
Snap To | x, y | Instantly set position; cancels any move tween. |
Scale To | value, durationMs, easing | Tween scale to value. |
Rotate To | value, durationMs, easing | Tween rotation to value. |
Cancel Tweens | — | Stop all tweens; snap targets to current. |
Reset Home | — | Return position/scale/rotation to home. |
Bounce | amount | Scale-bounce effect sized by amount. |
Shake | durationMs, intensity | Shake by oscillating scale/rotation with decay. |
Easing values: easeOutQuad (default), easeInQuad, easeInOutQuad, easeOutBack, easeOutBounce, linear.
Conditions
| Condition | True when |
|---|---|
isMoving | A move tween is active. |
isAnimating | Any tween or bounce is active. |
Events
| Event | Payload |
|---|---|
Move Complete | x, y |
Scale Complete | value |
Rotation Complete | value |
Shake Complete | durationMs, intensity |
Lifecycle
- onTick: Steps tweens, applies spring physics, runs shake/bounce, emits completion events.
- onPlayStart / onPlayEnd / onDetach: Reset motion runtime state.
::: note When something is being dragged While thing.dragging is true, move tweens cancel and Motion swaps to dragStiffness/dragDamping. The Draggable component (and engine) sets that flag — you don't wire it. :::
Sprite Renderer (spriteRenderer)
Category: Core Description: Draws an image-backed sprite and controls render order, tint, source, flip, and opacity.
Most fields are kind: internal — they persist and serialize but are managed by the engine and the Studio actions below, so they're hidden from the inspector and Flow.
Fields (selected)
| Field | Type | Default | Notes |
|---|---|---|---|
renderOrder | number | 0 | Position inside the nearest Sorting Group. |
tint | color | #ffffff | Flat overlay color. |
tintAmount | number | 0 | Overlay strength (0 = off, 1 = solid). |
assetSrc | string | "" | hidden; resolved image source. |
assetLibraryId | string | "" | hidden; source asset id. |
Actions
| Action | Params | Behavior |
|---|---|---|
Appear | style (fade/pop/scale), durationMs, delayMs | Show sprite with an entrance animation. |
Vanish | style (fade/shrink), durationMs, delayMs, hide, markDone | Fade/shrink out; optionally hide and/or mark done. |
Collect | durationMs | Shrink + fade out, hide, mark done. |
Set Sprite | assetId, preserveSize | Swap sprite image to a library asset. |
Set Flip | flipped (Flip X), flipY | Mirror the sprite horizontally and/or vertically. |
Set Alpha | value (0–1) | Set sprite opacity. |
Set Tint | color, amount (0–1) | Overlay a flat tint color on the sprite. |
Conditions
| Condition | True when |
|---|---|
Has Sprite | assetSrc or assetLibraryId is set. |
Sprite Is | current sprite matches a given asset. |
Is Animating | An appear/vanish tween is active. |
Events
| Event | Payload |
|---|---|
Appear Complete | style |
Vanish Complete | style, hidden |
Lifecycle
- onAttach: Reloads with asset resolution.
- onPlayStart: Initialises anim state, records home alpha/scale.
- onTick: Steps appear/vanish tweens.
Sprite Animator (spriteAnimator)
Category: Core Description: Controls named animation states, sprite sequences, and automatic locomotion animation. Requires Sprite Renderer.
Fields (selected)
| Field | Type | Default | Notes |
|---|---|---|---|
activeState | string | "idle" | hidden; current Animation State. |
stateSprites | object | {} | hidden; Animation State name → sprite source. |
stateSequences | object | {} | hidden; Animation State name → sprite frames. |
autoLocomotionStates | boolean | false | Automatically select locomotion states from a character controller. |
idleState/walkState/runState/jumpState/fallState/landingState | string | "idle"… | hidden; locomotion role → Animation State name. |
landingStateDurationMs | number | 150 | How long the Landing State is held after touching down. |
Actions
| Action | Params | Behavior |
|---|---|---|
Configure Locomotion States | idle/walk/jump/fall/landing/run sprites and sequences | Assign locomotion sprites and looping sequences. |
Play Animation | sequence, loop, restore | Play a sprite animation; a one-shot may restore the prior state frame. |
Set Idle/Walk/Run/Jump/Fall/Landing State | sprite, sequence, autoApply | Bind a locomotion state's sprite or animation. |
Set Locomotion State | role | Switch to an authored locomotion state. |
Set Automatic Locomotion States | enabled | Toggle controller-driven locomotion states. |
Set Animation State | state | Switch to a named Animation State. |
Conditions
Animation State Is, Locomotion State Is.
Events
| Event | Payload |
|---|---|
State Changed | oldValue, newValue |
Locomotion States Ready | count, role |
Animation Complete | name |
::: note Automatic locomotion states When enabled, Sprite Animator reads an attached character controller to select Idle, Walk, Run, Jump, Fall, and Landing states without extra Flow wiring. :::
Sorting Group (sortingGroup)
Category: Core Description: Keeps this object and its visual descendants together in paint order so a character or prop doesn't interleave with unrelated sprites.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
renderOrder | int | 0 | Positions the whole group relative to neighboring renderers and groups |
Sprite Renderer renderOrder is relative to the nearest Sorting Group ancestor.
Interactable (interactable)
Category: Core Description: Lets an object receive taps/clicks: its hit region, built-in tap action, and whether it blocks taps to objects behind it. This is the modern tap component — it's auto-added when you wire an "On Tap" graph.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | Off = ignores taps |
hitArea | enum | "sprite" | sprite (opaque pixels), bounds (full rectangle), collider (collider shape) |
blocksBehind | boolean | true | Off lets taps pass through to objects behind |
tapAction | enum | "none" | none, bounce, sparkle, sound, spin, collect, toggle |
tapOnly | boolean | false | On draggable objects, register a quick tap instead of a drag |
longPress | boolean | true | Emit Long Pressed |
doubleTap | boolean | true | Emit Double Tapped |
Actions
| Action | Params | Behavior |
|---|---|---|
Set Tap Action | action (enum) | Set the built-in tap reaction. |
Clear Tap Action | — | Set tapAction to none. |
Set Tappable | enabled | Enable/disable tap reception. |
Conditions
| Condition | True when |
|---|---|
Is Tappable | enabled is not false. |
hasAction | tapAction is not none. |
Action Is | tapAction matches a given value. |
Events
| Event | Payload |
|---|---|
Tapped | pointer |
Double Tapped | pointer |
Long Pressed | pointer |
Tappable (tappable) — legacy
Category: Core Description: Predecessor of Interactable. Still registered so older scenes and blueprints load, but new work should use Interactable. Most fields and events mirror Interactable; it lacks hitArea and blocksBehind.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
action | enum | "none" | none, bounce, sparkle, sound, spin, collect, toggle |
tapOnly | boolean | false | On draggable objects, register a quick tap instead of a drag |
longPress | boolean | true | Emit Long Pressed |
doubleTap | boolean | true | Emit Double Tapped |
Events
Tapped, Double Tapped, Long Pressed — payload pointer.
::: note Migrating to Interactable Open the object, remove Tappable, and add Interactable. The same tapAction, longPress, and doubleTap options carry across; pick a hitArea (sprite is the old default). :::
Draggable (draggable)
Category: Core Description: Lets an object be dragged, axis-constrained, and dropped onto Drop Zones.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
axis | enum | "free" | free, x, y |
bounds | enum | "none" | none, stage |
moveThreshold | number | 6 | Pixels the pointer must travel before a drag starts |
pickUpScale | number | 1.12 | Scale while held |
Actions
| Action | Params | Behavior |
|---|---|---|
Set Drag Axis | axis (free/x/y) | Constrain dragging axis. |
Set Drag Bounds | bounds (none/stage) | Set stage bounds. |
Set Pick-up Scale | value | Set scale while held. |
Conditions
| Condition | True when |
|---|---|
isDragging | thing.dragging is truthy. |
constrainedToStage | bounds is stage. |
Axis Is | axis matches. |
Events
| Event | Payload |
|---|---|
Drag Started | pointer |
Drag Moved | pointer, deltaX, deltaY |
Drag Ended | pointer |
Dropped | otherId, targetId, dropX, dropY |
::: note Drop Zones resolve targets The Dropped event carries otherId/targetId resolved from nearby Drop Zones. The engine sets thing.dragging, which Motion reads to switch to drag tuning — no wiring required. :::
Drop Zone (dropZone)
Category: Core Description: Marks an object as a target area for drops and proximity checks.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
radius | number | 110 | Proximity threshold in pixels |
Actions
| Action | Params | Behavior |
|---|---|---|
Set Radius | value | Set the zone radius. |
Conditions
| Condition | True when |
|---|---|
hasRadius | radius > 0 |
Radius At Least | radius ≥ value |
Events
| Event | Payload |
|---|---|
Entered | otherId, pointer |
Exited | otherId, pointer |
Dropped On | otherId, droppedId, dropX, dropY |
Control
Character controllers drive locomotion. The engine is shared (character-controller-core.js); three flavors expose it with different movement models. Set controlledBy to player, flow, ai, or network to choose who drives it.
Platformer Controller (platformerController)
Category: Control Description: Side-view locomotion with gravity, jumping, coyote time, jump buffering, and ground-aware foot probes.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
controlledBy | enum | "player" | player, flow, ai, network |
maxSpeed | number | 220 | px/s |
acceleration | number | 900 | px/s² |
friction | number | 1200 | px/s² |
airAcceleration | number | 700 | px/s² |
airFriction | number | 160 | px/s² |
gravity | number | 1800 | px/s² |
terminalVelocity | number | 1400 | px/s |
jumpSpeed | number | 620 | px/s |
maxJumps | int | 1 | 2 = double jump |
variableJumpHeight | boolean | true | Cut upward velocity when jump released early |
variableJumpMinPercent | number | 0.4 | Fraction of full jump retained |
coyoteTime | number | 0.08 | Seconds after leaving ground a jump still works |
jumpBufferTime | number | 0.08 | Seconds a queued jump waits before landing |
useStageFloor | boolean | true | Land on the bottom of the stage |
floorY | number | 0 | Custom floor Y when useStageFloor is off |
collideWithWorld | boolean | false | Use physics colliders |
clampToStage | boolean | false | Keep inside the stage |
arrivalRadius | number | 8 | px to count as "arrived" for Move Toward |
footProbe* | — | — | Foot probing: showFootProbes, footProbeSpread, footProbeInset, footProbeLeftX/RightX, footProbeDepth, footProbeLift, footProbeYOffset, footProbeMode (leading/…), footProbeSpeed |
rotateSprite | boolean | false | Flip sprite horizontally to face movement |
jumpKey | string | "Space" | |
leftKey/rightKey/upKey/downKey | string | Arrow keys | |
wasd | boolean | true | Also accept WASD |
moving | boolean | false | output |
facing | enum | "right" | output; 8-directional |
grounded / jumping / falling | boolean | false | output |
Actions
| Action | Params | Behavior |
|---|---|---|
Set Move Input | x, y | Set persistent movement intent. |
Move Direction | x, y | Set movement direction intent. |
Move Toward | x, y, stopWithin | Move toward a point; emits Arrived on arrival. |
Clear Move Target | — | Clear the move-to target. |
Stop | haltVelocity | Stop; optionally halt velocity. |
Set Speed | value | Set maxSpeed. |
Set Controller Enabled | enabled | Enable/disable. |
Set Facing / Face Direction | direction / x, y | Set facing. |
Jump | strength | Queue a jump. |
Conditions
| Condition | True when |
|---|---|
Can Move | enabled is true. |
Is Moving / Is Idle | moving is true / false. |
Has Move Target | A move-to target exists. |
Facing Is | facing matches. |
Is Grounded / Is Airborne | grounded is true / false. |
Is Falling | falling is true. |
Can Jump | Enabled and has a ground jump or remaining jumps. |
Events
| Event | Payload |
|---|---|
Move Started / Move Stopped | x, y, vx, vy, speed |
Direction Changed / Facing Changed | direction, x, y |
Arrived | x, y |
Jumped | x, y, vx, vy, jumpsUsed |
Landed / Left Ground | x, y, vx, vy |
Top-Down Controller (topDownController)
Category: Control Description: Free-plane movement in all directions, with optional diagonal movement and turn-to-face.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
controlledBy | enum | "player" | player, flow, ai, network |
maxSpeed | number | 220 | px/s |
acceleration | number | 900 | px/s² |
friction | number | 1200 | px/s² |
allowDiagonal | boolean | true | Off = 4-way cardinal only |
turning | enum | "none" | none, instant, smooth |
rotateSprite | boolean | false | Rotate sprite toward movement |
collideWithWorld / clampToStage | boolean | false | |
arrivalRadius | number | 8 | |
left/right/up/downKey, wasd | — | — | Same input fields as Platformer |
moving | boolean | false | output |
facing | enum | "right" | output |
Actions & Conditions
Same shared action/condition set as Platformer (Set Move Input, Move Direction, Move Toward, Clear Move Target, Stop, Set Speed, Set Controller Enabled, Set Facing, Face Direction; conditions Can Move, Is Moving, Is Idle, Has Move Target, Facing Is). No jump, ground, or air actions.
Events
Move Started, Move Stopped, Direction Changed, Facing Changed, Arrived.
Side-Scroller Controller (sideScrollerController)
Category: Control Description: Horizontal-focused movement (no gravity), with an optional vertical axis. Flips the sprite to face travel.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
controlledBy | enum | "player" | player, flow, ai, network |
maxSpeed | number | 220 | px/s |
acceleration | number | 900 | px/s² |
friction | number | 1200 | px/s² |
sideScrollerVertical | boolean | false | Also allow up/down movement |
rotateSprite | boolean | false | Flip sprite horizontally to face movement |
collideWithWorld / clampToStage | boolean | false | |
arrivalRadius | number | 8 | |
left/right/up/downKey, wasd | — | — | Same input fields as Platformer |
moving | boolean | false | output |
facing | enum | "right" | output |
Actions, Conditions & Events
Same shared action/condition/event set as Top-Down. No jump.
Driving a controller with AI
Set the controller's controlledBy to ai and add AI Mover — it drives moveDirection/moveToward/stop for you. For Flow-driven control, set controlledBy to flow and call Move Direction/Move Toward from graphs.
AI Mover (aiMover)
Category: Control Description: Drives a character controller set to controlledBy: ai to patrol, follow, or flee — no Flow wiring needed.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
behavior | enum | "patrol" | patrol, follow, flee, idle |
target | objectRef | "" | Object to follow or flee |
detectRange | number | 0 | px; 0 = always active |
patrolDistance | number | 96 | px from spawn point |
patrolAxis | enum | "horizontal" | horizontal, vertical |
stopWithin | number | 8 | How close to stop when following |
seesTarget | boolean | false | output; true while target within detect range |
Actions
| Action | Params | Behavior |
|---|---|---|
Set Behavior | behavior | Set patrol/follow/flee/idle. |
Set Target | target | Set the follow/flee target. |
Set Enabled | enabled | Enable/disable AI movement. |
Conditions
| Condition | True when |
|---|---|
Has Target | target resolves to a live object. |
Sees Target | seesTarget is true. |
Events
Target Spotted, Target Lost (no payload).
::: note Requires a character controller AI Mover locates any character controller on the same object each tick and drives it. The controller must be set to Controlled By: AI. :::
Combat
Health (health)
Category: Combat Description: Tracks HP, applies damage and healing, emits lifecycle events.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
hp | number | 30 | Current HP (min 0) |
maxHp | number | 30 | Maximum HP (min 1) |
invulnerable | boolean | false | Blocks damage |
resetOnPlay | boolean | true | Refill to maxHp on play start |
Events
| Event | Payload |
|---|---|
damaged | amount, remainingHp |
healed | amount, remainingHp |
died | remainingHp (0) |
Actions
| Action | Params | Behavior |
|---|---|---|
damage | amount | Subtract HP; emit damaged; emit died at 0. |
heal | amount | Add HP up to maxHp; emit healed. |
setHp | value | Clamp and emit damaged/healed/died as needed. |
setMaxHp | value, adjustCurrent | Raise/lower max HP; optionally clamp current. |
refill | — | Set HP to maxHp. |
kill | — | Force HP to 0; emit died. |
Conditions
| Condition | Params | True when |
|---|---|---|
isDead | — | HP ≤ 0 |
isAlive | — | HP > 0 |
isAtFull | — | HP ≥ maxHp |
hpAtLeast | value | HP ≥ value |
hpBelow | value | HP < value |
Lifecycle
- onAttach: Clamps HP to maxHp if needed.
- onPlayStart: Refills HP when
resetOnPlayis true.
Stats (stats)
Category: Combat Description: Attack, defense, and speed with temporary bonuses.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
atk | number | 5 | Base attack |
def | number | 1 | Base defense |
spd | number | 5 | Base speed (used by Turn Queue) |
atkBonus / defBonus / spdBonus | number | 0 | Hidden modifiers |
Effective values in logic: base + bonus.
Events
| Event | Payload |
|---|---|
statChanged | stat, oldValue, newValue |
Actions
| Action | Params |
|---|---|
addModifier | stat (atk/def/spd), amount |
setBase | stat, value |
clearModifiers | — |
Conditions
| Condition | Params |
|---|---|
fasterThan | other (objectRef) — compares effective speed to another object's Stats; falls back to otherSpd when empty |
Ability Cooldown (abilityCooldown)
Category: Combat Description: Timed gate for abilities; counts down each frame.
Fields
| Field | Type | Default |
|---|---|---|
duration | number | 1.5 (seconds) |
remaining | number | 0 (read-only) |
autoStart | boolean | false |
Events
used, ready.
Actions
| Action | Returns |
|---|---|
use | false if still cooling; otherwise starts timer and emits used |
forceReady | Clears remaining; emits ready |
setDuration | value — updates duration |
Conditions
canUse (remaining ≤ 0), isCoolingDown.
Lifecycle
- onPlayStart: Sets
remainingfromautoStart. - onTick: Decrements
remaining; emitsreadywhen it hits zero.
Combat Action (combatAction)
Category: Combat Requires: statsDescription: Applies stat-based attacks to another object's Health.
Damage formula: attacker atk + atkBonus + power + bonusPower − target def/defBonus, clamped to minimum damage. Friendly fire is blocked unless enabled.
Fields
| Field | Type | Default |
|---|---|---|
power | number | 0 |
minDamage | number | 1 |
variance | number | 0 |
useDefense | boolean | true |
allowFriendlyFire | boolean | false |
Events
attacked (attackerId, targetId, amount), blocked (attackerId, targetId, reason).
Actions
| Action | Params |
|---|---|
attack | targetId, power, minDamage, optional endTurn + turnQueueId |
Conditions
canAttack — target exists, has Health above 0, and is not an ally unless friendly fire is enabled.
Turn Queue (turnQueue)
Category: Combat Description: Cycles turns across objects in a named Group. Attach to a controller object; fighters share the same group string on their Thing.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
group | string | "" | Scene group name (e.g. Combatants) |
order | enum | "registered" | registered, speedDesc, random |
skipDefeated | boolean | true | Ignore visible members whose Health is 0 |
stopWhenOneTeam | boolean | true | End a multi-team battle once one team remains |
activeId | string | — | hidden; current actor object id |
queue | string | — | hidden; comma-separated id queue |
indicatorId | objectRef | "" | Optional arrow/marker snapped above the active combatant |
indicatorOffsetY | number | -48 | Gap used for automatic indicator placement |
Events
turnStart (actorId), turnEnd (actorId), roundStart, queueEmpty, battleEnd (winningTeam).
Actions
| Action | Description |
|---|---|
rebuild | Collect visible group members and rebuild queue. |
next | End current turn, advance; auto-rebuild if empty; may emit roundStart; moves indicatorId when set. |
positionIndicator | Snap marker above the active combatant (marker, offsetY). |
Conditions
isActive — compares activeId to a given object ref.
Ordering
- speedDesc: Sort by Stats
spd(higher first). - random: Shuffle member ids.
- registered: Scene order of members.
Team (team)
Category: Combat Description: Faction tag for ally/enemy checks in graphs.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
name | string | "neutral" | e.g. player, enemy |
Actions
setTeam — value (string).
Conditions
| Condition | Params |
|---|---|
isAlly | other (objectRef) — same team name |
isEnemy | other — different non-empty team |
Health Bar (healthBar)
Category: UI Requires: healthDescription: Draws an HP bar above the object.
Fields
| Field | Type | Notes |
|---|---|---|
width, height | number | Bar size |
offsetY | number | Vertical offset above sprite |
showWhenFull | boolean | Hide bar at full HP |
showOnHover | boolean | Show on pointer hover or after damage |
fillColor, bgColor, lowColor | color | Bar colors |
lowThreshold | number | 0–1 fraction for "low HP" color |
flashOnHit | boolean | Brief flash on damage |
visible | boolean | hidden; runtime visibility |
Events
barShown, barHidden.
Actions
show, hide, flash.
Conditions
isVisible.
Sibling handlers
Reacts to Health on the same object without extra graph wiring:
| Handler key | Behavior |
|---|---|
health.damaged | Flash bar; show if showOnHover. |
health.died | Hide bar. |
Hazard (hazard)
Category: Combat Requires: collider2d (auto-attached) Description: Damages objects that touch it (targets need Health). Auto-adds a sensor Collider 2D.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
damage | number | 1 | HP removed per hit |
targetGroup | string | "" | Only objects in this group/team take damage; empty = anyone with Health |
continuous | boolean | false | Keep damaging on interval while in contact |
interval | number | 0.5 | Seconds between hits when continuous |
destroySelf | boolean | false | Vanish after dealing damage (projectiles) |
Events
| Event | Payload |
|---|---|
Hurt Something | targetId, targetName, amount |
::: note How it hurts Hazard runs the target's health.damage action on each qualifying contact. With continuous off, it damages a given target once per contact; with it on, every interval seconds while still touching. :::
Items
Inventory (inventory)
Category: Items Description: Named item stacks (serialized as an internal string map).
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
capacity | number | 99 | Max distinct item types |
items | string | "" | Read-only encoded stacks |
Events
itemAdded, itemRemoved, full.
Actions
| Action | Params |
|---|---|
add | item, count |
remove | item, count |
clear | — |
Conditions
has (item), hasAtLeast (item, count).
Pickup (pickup)
Category: Items Requires: collider2d (auto-attached) Description: Collectible: when a qualifying object overlaps it, fires Collected and vanishes. Auto-adds a sensor Collider 2D.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
collectorGroup | string | "" | Only objects in this group/team can collect; empty = anyone |
points | number | 1 | Score value in the Collected payload |
vanish | boolean | true | Hide on collect (uses Sprite Renderer's collect animation if present) |
collected | boolean | false | output; true once picked up |
Actions
| Action | Behavior |
|---|---|
Reset | Make the pickup collectible again and show it. |
Conditions
Is Collected — collected is true.
Events
| Event | Payload |
|---|---|
Collected | byId, byName, points |
::: note Vanish animation On collect, Pickup runs the Sprite Renderer collect action if one is present on the same object; otherwise it hides and marks done directly. :::
Logic
Timer (timer)
Category: Logic Description: Counts down and fires Completed when it elapses. Loops on demand. Drive it from Flow or auto-start on play.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
duration | number | 1 | seconds |
autoStart | boolean | true | Start counting when play starts |
loop | boolean | false | Restart automatically on completion |
running | boolean | false | output |
elapsed | number | 0 | output; seconds counted |
remaining | number | 0 | output; seconds left |
Actions
| Action | Behavior |
|---|---|
Start | Start or resume. |
Restart | Reset to zero and start. |
Stop | Pause where it is. |
Reset | Stop and clear elapsed to zero. |
Set Duration | Set duration in seconds. |
Conditions
Is Running, Is Done (not running, elapsed ≥ duration, duration > 0).
Events
| Event | Payload |
|---|---|
Started | duration |
Completed | duration |
Looped | count |
Spawner (spawner)
Category: Control Description: Spawns a prefab on an interval at this object's position. Great for enemy waves, obstacles, and pickups.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
prefab | assetRef | "" | Prefab asset to spawn (assetKind: blueprint) |
interval | number | 1.5 | seconds between spawns |
autoStart | boolean | true | Begin spawning on play start |
spawnOnStart | boolean | false | Emit first spawn immediately |
limit | int | 0 | Max spawns; 0 = unlimited |
offsetX / offsetY | number | 0 | Spawn offset from this object |
running | boolean | false | output |
spawnCount | number | 0 | output; total spawned this play |
Actions
| Action | Behavior |
|---|---|
Start | Start the spawner. |
Stop | Stop the spawner. |
Reset | Clear spawn count for a fresh limit. |
Spawn Now | Spawn one prefab immediately, ignoring interval. |
Conditions
Is Spawning — running is true.
Events
| Event | Payload |
|---|---|
Spawned | prefab, x, y, count |
Finished | count |
Prefabs are assets
Spawner spawns a prefab — a reusable object blueprint. Author the object once, save it as a prefab, then point prefab at it.
Physics (2D)
See the Physics guide for setup, coordinates, and troubleshooting.
Rigid Body 2D (rigidBody2d)
Category: Physics Description: Simulates mass and velocity. Requires Collider 2D to collide with other objects.
Fields (selected)
| Field | Type | Default | Notes |
|---|---|---|---|
bodyType | enum | "dynamic" | dynamic, fixed, kinematicPosition, kinematicVelocity |
gravityScale | number | 1 | 0 disables gravity for this body |
linearDamping | number | 0 | Slows linear motion |
lockRotation / lockX / lockY | boolean | false | Axis locks |
vx, vy, speed, sleeping | — | — | Read-only at runtime |
Events
collisionStart, collisionEnd — payload: otherId, otherName, started, sensor.
Actions
setVelocity, addVelocity, applyImpulse, setAngularVelocity, teleport, setBodyType, setEnabled, wake, sleep.
Conditions
isDynamic, isKinematic, isMoving, isSleeping.
Collider 2D (collider2d)
Category: Physics Description: Collision shape for Rapier. Collider-only attachments become implicit fixed bodies (floors, walls).
Fields (selected)
| Field | Type | Default | Notes |
|---|---|---|---|
shape | enum | "box" | box, circle, capsule |
useObjectSize | boolean | true | Match sprite bounds |
sensor | boolean | false | Trigger only — no physical push |
friction | number | 0.7 | Surface friction |
restitution | number | 0 | Bounce (0–1) |
colliding, contactCount | — | — | Read-only at runtime |
Events
Same collision events as Rigid Body 2D.
Actions
setSensor, setEnabled.
Conditions
isSensor, isColliding, hasContacts.
Joint 2D (joint2d)
Category: Physics Description: Connects this object's rigid body to another with a hinge, weld, or distance joint. Both objects need Rigid Body 2D (and usually Collider 2D).
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
target | objectRef | "" | Other object this joint connects to |
type | enum | "revolute" | revolute (hinge), fixed (weld), distance (rope/spring) |
anchorX / anchorY | number | 0 | Body-local pixels (0,0 = centre) |
targetAnchorX / targetAnchorY | number | 0 | Target body-local |
limitMin / limitMax | number | -180 / 180 | Degrees; revolute only |
motorSpeed | number | 0 | rad/s; revolute only |
motorForce | number | 0 | revolute only |
restLength | number | 0 | distance joint natural length; 0 = capture current separation |
stiffness | number | 0 | 0 = rope (max length only), >0 = spring |
collideConnected | boolean | false | Allow connected bodies to collide |
breakForce | number | 0 | Max anchor separation (px) before break; 0 = unbreakable |
Actions
| Action | Params | Behavior |
|---|---|---|
Set Enabled | enabled | Enable/disable; releases physics on disable. |
Break Joint | — | Disable and release the joint. |
Set Limits | min, max | Set hinge angle limits (revolute). |
Set Motor | speed, force | Set motor speed/force (revolute). |
Events
Broke — otherId, force.
Ragdoll (ragdoll)
Category: Physics Description: Makes a skinned skeleton go limp using physics bones authored in Skeleton Studio. Activate on death or via action.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
activateOnDeath | boolean | true | Activate ragdoll when Health dies |
active | boolean | false | read-only; currently limp |
blendBack | number | 0 | Reserved for future blend-back |
Actions
| Action | Params | Behavior |
|---|---|---|
Activate | — | Spawn bone bodies at the current animated pose and go limp; stops skeleton clips. |
Deactivate | — | Free bone bodies; bones keep last limp pose. |
Impulse Bone | boneId, x, y | Apply a linear impulse to one physics bone. |
Events
| Event | Payload |
|---|---|
Activated | — |
Bone Hit | boneId, otherId, otherBoneId |
::: note Activates on death With activateOnDeath on, Ragdoll listens for the Health died sibling event and activates automatically. :::
Projectile (projectile)
Category: Physics Description: Arrow / bolt / dart flight: points along velocity while flying and can weld into what it hits. Requires dynamic Rigid Body 2D + Collider 2D. Enable Continuous Collision on the rigid body so fast shots don't tunnel.
Fields (selected)
| Field | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | |
alignToVelocity | boolean | true | Face direction of travel each tick |
minAlignSpeed | number | 30 | px/s; skip alignment when slower |
turnSpeed | number | 0 | deg/s; 0 = snap instantly |
angleOffset | number | 0 | Degrees if art doesn't point +X at rotation 0 |
stickOnHit | boolean | true | Weld into first solid hit (sensors never stick) |
ignoreOwner | boolean | true | Never stick to the spawner / owner hierarchy |
stickGroup / ignoreGroup | string | "" | Optional group filters |
armDelay | number | 80 | ms before sticking arms (avoids welding to shooter on spawn) |
breakForce | number | 0 | Max anchor separation (px) before tear-free; 0 = stuck for good |
stuck / stuckToId | — | — | output |
Actions
| Action | Params | Behavior |
|---|---|---|
Launch | speed, angle | Fire along facing (or explicit angle); unsticks first and re-arms stick delay |
Unstick | — | Release the weld |
Set Owner | targetId | Assign who fired this (spawned projectiles get owner automatically) |
Conditions
Is Stuck
Events
| Event | Payload |
|---|---|
Stuck | otherId, otherName |
Unstuck | otherId, reason |
Scene
Scene Camera (scene_camera)
Category: Scene Description: Where the viewport opens when you play: position, zoom, optional follow target, and an editor preview guide.
Fields
| Field | Type | Default | Notes |
|---|---|---|---|
zoom | number | 1 | 0.75–2.2 |
followInPlay | boolean | false | Keep the camera centred on the follow target during play |
previewFrame | boolean | true | Draw the viewport guide overlay in the editor |
followTargetId | objectRef | "" | Object to track when followInPlay is on |
isDefault | boolean | false | Make this the active camera on scene start |
Actions
| Action | Params | Behavior |
|---|---|---|
Set Zoom | value | Set zoom, clamped to 0.75–2.2. |
Follow Object | targetId, followInPlay | Set follow target; optionally enable follow. |
Clear Follow | — | Clear target and disable follow. |
Reset camera | — | Move to stage centre, reset zoom to 1, clear follow, enable preview. |
Conditions
isDefault, hasFollowTarget.
::: note One default camera Set isDefault on the camera you want active when the scene starts. A non-default camera becomes active by calling its actions from Flow (e.g. Follow Object). :::
Combining components (patterns)
| Goal | Components |
|---|---|
| Damageable enemy | Health, Stats, Combat Action, Team, Health Bar |
| Player character | Health, Stats, Combat Action, Team, Health Bar, Inventory |
| Animated platformer hero | Platformer Controller + Sprite Renderer + Sprite Animator (autoLocomotionStates on) |
| AI guard | Top-Down/Side-Scroller Controller (controlledBy: ai) + AI Mover |
| Skill button | Ability Cooldown + Object Flow on use / canUse |
| Battle loop | Turn Queue on a controller + group-tagged fighters |
| Collectible coin | Pickup (auto-adds sensor Collider 2D) |
| Spikes / damage zones | Hazard (auto-adds sensor Collider 2D) |
| Sticky arrow / bolt | Projectile + dynamic Rigid Body 2D (CCD on) + Collider 2D |
| Enemy waves | Spawner pointing at an enemy prefab |
| Physics prop | Rigid Body 2D + Collider 2D |
| Static platform / floor | Collider 2D only |
| Hinged door / lever | Joint 2D (revolute) between two Rigid Body 2D objects |
| Death flop | Health + Ragdoll (activateOnDeath on) |
| Countdown / spawn cadence | Timer driving other actions, or Spawner's own interval |
| Paint-order group | Sorting Group on a parent + Sprite Renderers on children |
For custom types authored in the editor, see Project components & Studio. To add engine-level built-ins in code, see Authoring components in code.