🎯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
objectTriggered when a new 3D object is successfully created in the scene.
Triggers when:
A new object is spawned or created
Parameters
Example Usage:
// On Object Created With Id "hero" -> Log "New object: " & ObjectID
Is Object Loaded In Scene
objectReturns 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
Example Usage:
// If Object with Id "enemyBoss" is loaded -> Play animation
On Object Destroyed
objectTriggered 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
Example Usage:
// On Object Destroyed with ID "barrel01" -> Spawn explosion effect
On Object Failed Create
objectTriggered 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
Is Visible
objectCheck if an object is currently visible to the camera.
Parameters
Example Usage:
// Check if object is visible
Is Visible ("enemy_1") -> Enable AI Behavior
Is In Camera View
objectTest 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
Scene Conditions
On 3D Scene Created
sceneTriggered 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"
On 3D Scene Create Fail
sceneTriggered 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"
Animations
On Animation Clip Finished
animationTriggered when a specific animation clip finishes playing on an object.
Triggers when:
An animation clip finishes playing completely.
Parameters
Example Usage:
// On Animation Clip Finished for object "player" index 2 -> Trigger next action
On Animation Loop Finished
animationTriggered 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
Example Usage:
// On Animation Loop Finished for object "npc01" index 0 -> Switch to idle animation
For Each Animation
animationLoops through each animation available on a specified object.
Triggers when:
Iterates through all animations for a given object.
Parameters
Example Usage:
// For Each Animation on object 'enemy' -> Print animation name or index
Spine 2d
On Spine Animation Started
spineTriggered 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}"
On Spine Animation Completed
spineTriggered 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}"
On Spine Animation Ended
spineTriggered 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}"
On Spine Event Fired
spineTriggered 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}"
Raycast
On Raycast Hit
objectTriggered 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!"
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)