Skip to main content

🧮Expressions

Expressions retrieve data from your 3D scene and return values that can be used in Construct 3 events. They're perfect for getting positions, rotations, scene information, and more.

Object

📦

Is Object Loaded

object
boolean

Check whether object is loaded.

Parameters

objectId
The ID of the object to check if it is loaded

Construct 3 Usage:

MakeIt3D.IsObjectLoaded("hero")

Example:

If MakeIt3D.IsObjectLoaded("hero") Then Log "Hero is ready!"
Expression
📦

Get Position X

object
🔢number

Get X position of object of Id.

Parameters

objectId
The ID of the object to get position x from

Construct 3 Usage:

MakeIt3D.PositionX("objectId")

Example:

Log MakeIt3D.PositionX("hero")
Expression
📦

Get Position Y

object
🔢number

Get Y position of object of Id.

Parameters

objectId
The ID of the object to get position y from

Construct 3 Usage:

MakeIt3D.PositionY("objectId")

Example:

Log MakeIt3D.PositionY("hero")
Expression
📦

Get Position Z

object
🔢number

Get Z position of object of Id.

Parameters

objectId
The ID of the object to get position z from

Construct 3 Usage:

MakeIt3D.PositionZ("objectId")

Example:

Log MakeIt3D.PositionZ("hero")
Expression
📦

Get Rotation X

object
🔢number

Get X rotation of object of Id in degrees.

Parameters

objectId
The ID of the object to get rotation x from

Construct 3 Usage:

MakeIt3D.RotationX("objectId")

Example:

Log MakeIt3D.RotationX("hero")
Expression
📦

Get Rotation Y

object
🔢number

Get Y rotation of object of Id in degrees.

Parameters

objectId
The ID of the object to get rotation y from

Construct 3 Usage:

MakeIt3D.RotationY("objectId")

Example:

Log MakeIt3D.RotationY("hero")
Expression
📦

Get Rotation Z

object
🔢number

Get Z rotation of object of Id in degrees.

Parameters

objectId
The ID of the object to get rotation z from

Construct 3 Usage:

MakeIt3D.RotationZ("objectId")

Example:

Log MakeIt3D.RotationZ("hero")
Expression
📦

Get Scale X

object
🔢number

Get X scale of object of Id.

Parameters

objectId
The ID of the object to get scale x from

Construct 3 Usage:

MakeIt3D.ScaleX("objectId")

Example:

Log MakeIt3D.ScaleX("hero")
Expression
📦

Get Scale Y

object
🔢number

Get Y scale of object of Id.

Parameters

objectId
The ID of the object to get scale y from

Construct 3 Usage:

MakeIt3D.ScaleY("objectId")

Example:

Log MakeIt3D.ScaleY("hero")
Expression
📦

Get Scale Z

object
🔢number

Get Z scale of object of Id.

Parameters

objectId
The ID of the object to get scale z from

Construct 3 Usage:

MakeIt3D.ScaleZ("objectId")

Example:

Log MakeIt3D.ScaleZ("hero")
Expression

Animation

🎬

Get Object Animations

animation
📝string

Returns all animations of object if it has any

Parameters

objectId
Unique identifier of the object to get animations

Construct 3 Usage:

MakeIt3D.GetObjectAnimationsArray("Id")

Example:

Log MakeIt3D.GetObjectAnimationsArray("hero")
Expression
🎬

Get Object Animation Count

animation
🔢number

Returns the number of animations associated with a given object.

Parameters

objectId
The ID of the object to get animation count from

Construct 3 Usage:

MakeIt3D.GetObjectAnimationCount("Id")

Example:

Log MakeIt3D.GetObjectAnimationCount("hero")
Expression
🎬

Get Object Animation Duration

animation
🔢number

Returns the duration of the specified animation from an object.

Parameters

objectId
The ID of the object to get animation from
animationName_Index
Animation name or index to retrieve duration

Construct 3 Usage:

MakeIt3D.GetObjectAnimationDuration("Id", 0)

Example:

Log MakeIt3D.GetObjectAnimationDuration("hero", "Idle")
Expression
🎬

Get Current Animation Name

animation
📝string

Returns the name of the current animation in a foreach loop context.

Construct 3 Usage:

MakeIt3D.GetCurrentAnimationName()

Example:

Log MakeIt3D.GetCurrentAnimationName()
Expression
🎬

Get Current Animation Duration

animation
🔢number

Returns the duration of the current animation in a foreach loop context.

Construct 3 Usage:

MakeIt3D.GetCurrentAnimationDuration()

Example:

Log MakeIt3D.GetCurrentAnimationDuration()
Expression

Raycast

Raycast Hit X

raycast
🔢number

Returns the X coordinate of the 3D point where the last raycast hit occurred.

Construct 3 Usage:

MakeIt3D.RaycastHitX()

Example:

Log MakeIt3D.RaycastHitX()
Expression

Raycast Hit Y

raycast
🔢number

Returns the Y coordinate of the 3D point where the last raycast hit occurred.

Construct 3 Usage:

MakeIt3D.RaycastHitY()

Example:

Log MakeIt3D.RaycastHitY()
Expression

Raycast Hit Z

raycast
🔢number

Returns the Z coordinate of the 3D point where the last raycast hit occurred.

Construct 3 Usage:

MakeIt3D.RaycastHitZ()

Example:

Log MakeIt3D.RaycastHitZ()
Expression

Raycast Hit Normal X

raycast
🔢number

Returns the X component of the surface normal at the 3D point where the last raycast hit occurred.

Construct 3 Usage:

MakeIt3D.RaycastHitNormalX()

Example:

Log MakeIt3D.RaycastHitNormalX()
Expression

Raycast Hit Normal Y

raycast
🔢number

Returns the Y component of the surface normal at the 3D point where the last raycast hit occurred.

Construct 3 Usage:

MakeIt3D.RaycastHitNormalY()

Example:

Log MakeIt3D.RaycastHitNormalY()
Expression

Raycast Hit Normal Z

raycast
🔢number

Returns the Z component of the surface normal at the 3D point where the last raycast hit occurred.

Construct 3 Usage:

MakeIt3D.RaycastHitNormalZ()

Example:

Log MakeIt3D.RaycastHitNormalZ()
Expression

Raycast Hit Object ID

raycast
📝string

Returns the app-specific ID of the object that was hit by the last raycast.

Construct 3 Usage:

MakeIt3D.RaycastObjectId()

Example:

Log MakeIt3D.RaycastObjectId()
Expression

Raycast Hit Object Name

raycast
📝string

Returns the name of the object that was hit by the last raycast.

Construct 3 Usage:

MakeIt3D.RaycastObjectName()

Example:

Log MakeIt3D.RaycastObjectName()
Expression

Raycast Hit Distance

raycast
🔢number

Returns the distance from the camera to the point where the last raycast hit occurred.

Construct 3 Usage:

MakeIt3D.RaycastDistance()

Example:

Log MakeIt3D.RaycastDistance()
Expression

Raycast UV U

raycast
🔢number

Returns the U (horizontal) texture coordinate at the raycast hit point, if available.

Construct 3 Usage:

MakeIt3D.Raycast_UV_U()

Example:

Log MakeIt3D.Raycast_UV_U()
Expression

Raycast UV V

raycast
🔢number

Returns the V (vertical) texture coordinate at the raycast hit point, if available.

Construct 3 Usage:

MakeIt3D.Raycast_UV_V()

Example:

Log MakeIt3D.Raycast_UV_V()
Expression

Raycast Face Index

raycast
🔢number

Returns the index of the triangle face that was hit, if available.

Construct 3 Usage:

MakeIt3D.RaycastFaceIndex()

Example:

Log MakeIt3D.RaycastFaceIndex()
Expression

Raycast Hit JSON

raycast
📝string

Returns the full raycast hit data as a JSON string, including position, distance, object ID, and more.

Construct 3 Usage:

MakeIt3D.RaycastHitJSON()

Example:

Log MakeIt3D.RaycastHitJSON()
Expression

Utility

📊

RGB

utility
📊color

Create a color from RGB values (0-255).

Parameters

r
Red component (0-255)
g
Green component (0-255)
b
Blue component (0-255)

Construct 3 Usage:

MakeIt3D.RGB(255, 0, 0)

Example:

SetColor MakeIt3D.RGB(255, 100, 50)
Expression
📊

RGBA

utility
📊color

Create a color from RGB values (0-255) with Alpha (0-255).

Parameters

r
Red component (0-255)
g
Green component (0-255)
b
Blue component (0-255)
a
Alpha component (0-255)

Construct 3 Usage:

MakeIt3D.RGBA(0, 255, 0, 128)

Example:

SetColor MakeIt3D.RGBA(0, 255, 0, 128)
Expression
📊

Vector3

utility
📊vector3

Returns a vector3 object with x, y, z values.

Parameters

x
X value of the vector3
y
Y value of the vector3
z
Z value of the vector3

Construct 3 Usage:

MakeIt3D.Vector3(1, 2, 3)

Example:

MoveObject "hero" to MakeIt3D.Vector3(0, 5, 0)
Expression
📊

Array

utility
📊array

Collects all passed arguments into a single array. Useful for variadic inputs.

Construct 3 Usage:

MakeIt3D.ToArray("a", "b", "c")

Example:

Log MakeIt3D.ToArray(1, 2, 3)
Expression
📊

Build Uniforms

utility
📊uniform

Returns a uniform from given string of uniforms.

Parameters

uniforms
String of uniforms to build

Construct 3 Usage:

MakeIt3D.ShaderUniforms("time: 1.0; color: [1, 0, 0]")

Example:

ApplyShader Uniforms: MakeIt3D.ShaderUniforms("uColor: [1, 1, 1]")
Expression
📊

Get Last Error Message

utility
📝string

Get the last error message.

Construct 3 Usage:

MakeIt3D.GetLastErrorMsg()

Example:

Log MakeIt3D.GetLastErrorMsg()
Expression

Usage Guidelines

Return Types Guide

  • 🔢 Number - Numeric values (positions, rotations, counts, distances)
  • 📝 String - Text values (object IDs, file paths, error messages)
  • ✓ Boolean - True/false values (loaded states, visibility checks)
  • 📋 Object - Complex data structures (rarely used)

Best Practices

  • Cache Values - Store frequently accessed expressions in variables
  • Use in Comparisons - Perfect for System Compare conditions
  • Update Displays - Great for updating UI text with real-time data
  • Performance - Expressions are fast but avoid calling them every tick unnecessarily

Common Patterns

// Update UI with object position
Every Tick -> Set Text to "X: " & MakeIt3D.GetObjectPositionX("player")

// Check distance for gameplay
System Compare: MakeIt3D.GetDistanceBetween("player", "goal") < 2
-> Go to next layout

// Monitor performance
MakeIt3D.GetFPS() < 30 -> Enable performance mode