Conditions
Conditions are the WHEN / IF part of an event. All conditions of an event must be true for its actions to run (or any of them, in an OR block). A condition about an object picks the instances that match, so the actions only affect those. See How events work.
- ⚡ Trigger runs at the moment something happens (not every frame). It can’t be inverted.
- 🔁 Loop repeats the rest of the event.
- Most other conditions can be inverted (NOT) from the condition’s menu.
There are 54 conditions, grouped by category as in the condition picker.
⚙️ System · 🔢 Variables · ⏱️ Time · 🎬 Scene · 🔄 Loops · 🎮 Input · 📦 Object · 🧱 Physics · 🖼️ UI · ✨ Particles
⚙️ System
On start of scene
On start of scene ⚡ TriggerRuns once when the scene starts.
- Where: Found under System in the picker.
- ID:
system.onStart(as saved in project files) - Parameters: none
Every tick
Every tickTrue every frame (about 60 times per second).
- Where: Found under System in the picker.
- ID:
system.everyTick(as saved in project files) - Parameters: none
Compare two values
‹First value› ‹Comparison› ‹Second value›Compare any two expressions, e.g. Player.x > 10.
- Where: Found under System in the picker.
- ID:
system.compare(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| First value | Expression | 0 | |
| Comparison | Choice | = | Options: =, ≠, <, ≤, >, ≥ |
| Second value | Expression | 0 |
Is true
‹Expression› is trueTrue when the expression is true (or not 0).
- Where: Found under System in the picker.
- ID:
system.isTrue(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Expression | Expression | true |
Is between
‹Value› is between ‹Min› and ‹Max›True when a value is between min and max (inclusive).
- Where: Found under System in the picker.
- ID:
system.isBetween(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Value | Expression | 0 | |
| Min | Number (expression) | 0 | |
| Max | Number (expression) | 10 |
Random chance
‹Percent›% chanceTrue randomly, e.g. 25 = one time in four.
- Where: Found under System in the picker.
- ID:
system.chance(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Percent | Number (expression) | 50 |
Trigger once while true
Trigger once while truePut last: the event runs only once each time the other conditions become true.
- Where: Found under System in the picker.
- ID:
system.once(as saved in project files) - Parameters: none
Group is active
Group ‹Group› is activeTrue if the event group is active.
- Where: Found under System in the picker.
- ID:
system.isGroupActive(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Group | Event group |
🔢 Variables
Compare variable
‹Variable› ‹Comparison› ‹Value›Compare a global or scene variable with a value.
- Where: Found under System in the picker.
- ID:
system.compareVar(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Variable | Variable | ||
| Comparison | Choice | = | Options: =, ≠, <, ≤, >, ≥ |
| Value | Expression | 0 |
Compare instance variable
‹Object›.‹Instance variable› ‹Comparison› ‹Value›Compare one of the object's own variables (e.g. hp).
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.compareVar(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Instance variable | Variable | An instance variable of the object. | |
| Comparison | Choice | = | Options: =, ≠, <, ≤, >, ≥ |
| Value | Expression | 0 |
⏱️ Time
Every X seconds
Every ‹Seconds› secondsTrue once every few seconds.
- Where: Found under System in the picker.
- ID:
system.every(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Seconds | Number (expression) | 1 |
On timer finished
Timer ‹Timer name› finished ⚡ TriggerTrue at the moment a timer started with "Start timer" runs out.
- Where: Found under System in the picker.
- ID:
time.timerFinished(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Timer name | Text | timer |
Timer is running
Timer ‹Timer name› is runningTrue while a timer is counting down.
- Where: Found under System in the picker.
- ID:
time.isTimerRunning(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Timer name | Text | timer |
Compare scene time
Scene time ‹Comparison› ‹Seconds› sCompare the seconds since the scene started.
- Where: Found under System in the picker.
- ID:
time.compareTime(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Comparison | Choice | = | Options: =, ≠, <, ≤, >, ≥ |
| Seconds | Number (expression) | 10 |
🎬 Scene
On end of scene
On end of scene ⚡ TriggerRuns once when the scene ends (changing or restarting scene).
- Where: Found under System in the picker.
- ID:
scene.onEnd(as saved in project files) - Parameters: none
🔄 Loops
Repeat
Repeat ‹Times› times 🔁 LoopRuns the actions and sub-events several times. Use loopIndex for the current number.
- Where: Found under System in the picker.
- ID:
system.repeat(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Times | Number (expression) | 3 |
For
For ‹Loop name› from ‹From› to ‹To› 🔁 LoopRepeats the rest of the event, counting from start to end (both included). Use loopindex("name") for the current number.
- Where: Found under System in the picker.
- ID:
system.for(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Loop name | Text | i | |
| From | Number (expression) | 0 | |
| To | Number (expression) | 9 |
While
While 🔁 LoopRepeats the rest of the event as long as the conditions after it are true (or until "Stop loop").
- Where: Found under System in the picker.
- ID:
system.while(as saved in project files) - Parameters: none
For each
For each ‹Object› 🔁 LoopRun the actions and sub-events once for every instance, one at a time.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.forEach(as saved in project files) - Parameters: none
🎮 Input
Button is held
Button ‹Button› is heldTrue while an on-screen button (or key) is held down.
- Where: Found under Input in the picker.
- ID:
input.buttonDown(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Button | Touch button | jump |
On button pressed
On button ‹Button› pressed ⚡ TriggerTrue at the moment a button is pressed.
- Where: Found under Input in the picker.
- ID:
input.buttonPressed(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Button | Touch button | jump |
On button released
On button ‹Button› released ⚡ TriggerTrue at the moment a button is released.
- Where: Found under Input in the picker.
- ID:
input.buttonReleased(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Button | Touch button | jump |
On screen tapped
On screen tapped ⚡ TriggerTrue when the player taps anywhere on the screen.
- Where: Found under Input in the picker.
- ID:
input.onTap(as saved in project files) - Parameters: none
Screen is touched
Screen is touchedTrue while a finger is on the screen.
- Where: Found under Input in the picker.
- ID:
input.screenTouched(as saved in project files) - Parameters: none
On swipe
On swipe ‹Direction› ⚡ TriggerTrue when the player swipes in a direction.
- Where: Found under Input in the picker.
- ID:
input.onSwipe(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Direction | Choice | any | Options: any, left, right, up, down |
Joystick is moving
Joystick is movingTrue while the joystick (or WASD / arrows) is pushed.
- Where: Found under Input in the picker.
- ID:
input.joystickMoving(as saved in project files) - Parameters: none
Joystick direction
Joystick pushed ‹Direction›True while the joystick is pushed in a direction.
- Where: Found under Input in the picker.
- ID:
input.joystickDirection(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Direction | Choice | up | Options: left, right, up, down |
Key is held
Key ‹Key› is heldTrue while a keyboard key is held (for testing on a computer).
- Where: Found under Input in the picker.
- ID:
input.keyDown(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Key | Keyboard key | Space |
On key pressed
On key ‹Key› pressed ⚡ TriggerTrue at the moment a keyboard key is pressed.
- Where: Found under Input in the picker.
- ID:
input.keyPressed(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Key | Keyboard key | Space |
On tapped
‹Object› is tapped ⚡ TriggerRuns when the player taps this object on screen (also works for UI buttons).
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.onTap(as saved in project files) - Parameters: none
📦 Object
Compare property
‹Object› ‹Property› ‹Comparison› ‹Value›Compare position, angle, size or speed, e.g. Player y < -5.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.compareProp(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Property | Choice | y | Options: x, y, z, angle, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, vx, vy, vz, speed, worldX, worldY, worldZ, text, value, max |
| Comparison | Choice | = | Options: =, ≠, <, ≤, >, ≥ |
| Value | Expression | 0 |
Is playing animation
‹Object› is playing animation ‹Animation›True while the given model animation is playing.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.isPlayingAnimation(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Animation | Expression | "walk" |
On animation finished
On ‹Object› animation ‹Animation (empty = any)› finished ⚡ TriggerRuns when a play-once animation (loop off) reaches its end. Leave the name empty for any animation.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.onAnimationFinished(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Animation (empty = any) | Text | Optional. |
Is tweening
‹Object› is tweening ‹Property›True while a tween of that property is still running.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.isTweening(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Property | Choice | size | Options: Position X, Position Y, Position Z, Angle (°), Size (all axes), Opacity |
Is visible
‹Object› is visibleTrue if the object is shown.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.isVisible(as saved in project files) - Parameters: none
Has tag
‹Object› has tag ‹Tag›True if the object has a tag.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.hasTag(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Tag | Tag |
On created
On ‹Object› created ⚡ TriggerRuns when a new instance of the object is created.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.onCreated(as saved in project files) - Parameters: none
On destroyed
On ‹Object› destroyed ⚡ TriggerRuns when an instance of the object is destroyed.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.onDestroyed(as saved in project files) - Parameters: none
Distance to
Distance ‹Object› ↔ ‹Other object› ‹Comparison› ‹Distance›Compare the distance between the object and the nearest other object.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.distanceTo(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Other object | Object or #tag | ||
| Comparison | Choice | = | Options: =, ≠, <, ≤, >, ≥ |
| Distance | Number (expression) | 2 |
Compare count
Number of ‹Object› ‹Comparison› ‹Count›Compare how many of this object exist (or are picked).
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.count(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Comparison | Choice | = | Options: =, ≠, <, ≤, >, ≥ |
| Count | Number (expression) | 0 |
Exists
‹Object› existsTrue if at least one of these objects exists. Invert it for "no more coins".
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.exists(as saved in project files) - Parameters: none
Pick nearest
Pick ‹Object› nearest to ‹Other object›Only use the instance closest to another object.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.pickNearest(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Other object | Object or #tag |
Pick farthest
Pick ‹Object› farthest from ‹Other object›Only use the instance farthest from another object.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.pickFarthest(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Other object | Object or #tag |
Pick random
Pick a random ‹Object›Only use one random instance.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.pickRandom(as saved in project files) - Parameters: none
🧱 Physics
On collision with
‹Object› collides with ‹Other object› ⚡ TriggerRuns at the moment the object starts touching another object.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.collidesWith(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Other object | Object or #tag |
On collision ended
‹Object› stops touching ‹Other object› ⚡ TriggerRuns at the moment two objects stop touching.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.collisionEnded(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Other object | Object or #tag |
Is touching
‹Object› is touching ‹Other object›True while the object touches (overlaps) another object.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.isTouching(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Other object | Object or #tag |
Is on ground
‹Object› is on the groundTrue when a physics object is standing on something.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.isOnGround(as saved in project files) - Parameters: none
Has line of sight to
‹Object› can see ‹Target›True when nothing solid (walls, crates…) is between the object and the target, e.g. an enemy only chases the player it can see. Triggers (checkpoints, coins) never block the view.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.hasLineOfSight(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Target | Object or #tag |
Is moving
‹Object› is movingTrue when the object's physics speed is above zero.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.isMoving(as saved in project files) - Parameters: none
🖼️ UI
On clicked
On ‹Object› clicked ⚡ TriggerRuns when the player taps a UI button (e.g. Start, Pause, Retry).
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
ui.onClick(as saved in project files) - Parameters: none
Is held down
‹Object› is held downTrue while the player holds a UI button (e.g. a custom fire button).
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
ui.isPressed(as saved in project files) - Parameters: none
Compare bar value
‹Object› value ‹Comparison› ‹Value›Compare the value of a progress bar, e.g. Health value ≤ 0.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
ui.compareValue(as saved in project files)
| Parameter | Type | Default | Notes |
|---|---|---|---|
| Comparison | Choice | = | Options: =, ≠, <, ≤, >, ≥ |
| Value | Expression | 0 |
✨ Particles
Is emitting particles
‹Object› is emitting particlesTrue while its Particles component is making new particles.
- Where: Pick an object (or a #tag) first, then this condition.
- ID:
object.isEmittingParticles(as saved in project files) - Parameters: none