Skip to main content

🎯Conditions

Conditions allow you to check the state of your 3D scene or respond to events. Use these in Construct 3 Event Sheets to create interactive 3D experiences.

Object Conditions

📦

On Object Created

object

Triggered when a new 3D object is successfully created in the scene.

Triggers when:

A new object is spawned or created

Parameters

objectId
Object Id to check whether created

Example Usage:

// On Object Created With Id "hero" -> Log "New object: " & ObjectID
Event Trigger
📦

Is Object Loaded In Scene

object
📋

Returns true if the object with the specified ID is currently loaded in the scene.

Triggers when:

Checks whether a specific object is present in the scene.

Parameters

objectId
The ID of the object to check for presence in the scene.

Example Usage:

// If Object with Id "enemyBoss" is loaded -> Play animation
State Check
📦

On Object Destroyed

object

Triggered when an object is destroyed and removed from the scene. If no object ID is provided, the condition triggers for any object.

Triggers when:

An object with the specified ID is destroyed or removed from the scene.

Parameters

objectId
The ID of the object to monitor for destruction (optional: leave empty to listen for all objects).

Example Usage:

// On Object Destroyed with ID "barrel01" -> Spawn explosion effect
Event Trigger
📦

On Object Failed Create

object

Triggered when a 3D object fails to be created in the scene.

Triggers when:

An object creation attempt fails due to invalid data, missing assets, or other errors.

Example Usage:

// On Object Failed To Create -> Log error or retry
Event Trigger
📦

Is Visible

object
📋

Check if an object is currently visible to the camera.

Parameters

Example Usage:

// Check if object is visible Is Visible ("enemy_1") -> Enable AI Behavior
State Check
📦

Is In Camera View

object
📋

Test whether an object is within the camera's field of view.

Parameters

Example Usage:

// Check with 10% margin Is In Camera View ("pickup_item", 0.1) -> Show UI Indicator
State Check

Scene Conditions

🌍

On 3D Scene Created

scene

Triggered when a new 3D scene is successfully created.

Triggers when:

A new scene is created and initialized in the engine.

Example Usage:

// On scene creation -> Log "Scene created successfully"
Event Trigger
🌍

On 3D Scene Create Fail

scene

Triggered when a 3D scene fails to create due to an error or invalid input.

Triggers when:

A scene creation attempt fails.

Example Usage:

// On scene creation failure -> Log "Failed to create scene"
Event Trigger

Animations

🎬

On Animation Clip Finished

animation

Triggered when a specific animation clip finishes playing on an object.

Triggers when:

An animation clip finishes playing completely.

Parameters

objectId
The ID of the object whose animation finished
animationIndex
The index of the animation clip that finished

Example Usage:

// On Animation Clip Finished for object "player" index 2 -> Trigger next action
Event Trigger
🎬

On Animation Loop Finished

animation

Triggered when an animation loop finishes playing on an object.

Triggers when:

An animation loop completes (e.g., a looping walk cycle ends its set loop count).

Parameters

objectId
The ID of the object whose animation loop finished
animationIndex
The index of the animation loop that finished

Example Usage:

// On Animation Loop Finished for object "npc01" index 0 -> Switch to idle animation
Event Trigger
🎬

For Each Animation

animation
🔁

Loops through each animation available on a specified object.

Triggers when:

Iterates through all animations for a given object.

Parameters

objectId
The ID of the object whose animations will be iterated

Example Usage:

// For Each Animation on object 'enemy' -> Print animation name or index
Loop / Iteration

Spine 2d

🦴

On Spine Animation Started

spine

Triggered when a Spine animation starts playing.

Triggers when:

A Spine animation begins for a skeleton object.

Example Usage:

// On Spine animation started -> Log "Animation {animationName} started for object {objectId}"
Event Trigger
🦴

On Spine Animation Completed

spine

Triggered each time a Spine animation completes a loop or finishes playing.

Triggers when:

A Spine animation finishes its play cycle or loop.

Example Usage:

// On Spine animation completed -> Log "Animation {animationName} completed for object {objectId}"
Event Trigger
🦴

On Spine Animation Ended

spine

Triggered when a Spine animation track ends or is replaced/cleared.

Triggers when:

A Spine animation track ends or is replaced by another animation.

Example Usage:

// On Spine animation ended -> Log "Animation {animationName} ended for object {objectId}"
Event Trigger
🦴

On Spine Event Fired

spine

Triggered when a Spine animation fires a custom event.

Triggers when:

A custom event is fired within a Spine animation.

Example Usage:

// On Spine event fired -> Log "Event {eventname} fired in animation {animationName} for object {objectId}"
Event Trigger

Raycast

📦

On Raycast Hit

object

Triggered when a raycast hits any object in the scene.

Triggers when:

A raycast intersects with an object.

Example Usage:

// On raycast hit -> Log "Ray hit object!"
Event Trigger

Usage Tips

Event Triggers vs State Checks

  • ⚡ Event Triggers - Run once when something happens (On Object Created, On Model Loaded)
  • 🔍 State Checks - Continuously check conditions (Is Visible, Camera Is Moving)

Performance Considerations

  • Use state-checking conditions sparingly in Every Tick events
  • Prefer event triggers for better performance when possible
  • Cache condition results when checking the same thing multiple times

Parameter Types

  • objectId - String identifier for specific objects
  • comparison - Operators like >, <, =, >=, <=
  • margin - Float value for tolerance/buffer zones (0.0 to 1.0)