Skip to content
AEOWUN
Docs Menu

Live Entities

Control objects that exist during Play.

Get a live Entity

const enemy = get_entity("Goblin")
if enemy != nil {
    enemy.damage(10)
}

No match returns nil. An Entity ID belongs to the runtime. It is not an authored Actor ID.

Position and movement

Use position for a three-number position and velocity for movement. jump(), damage(), heal(), and destroy() act on a valid Entity. Read grounded to check whether it is on the ground. Select the base animation with animation_name; animation is an animation handle, not a string.

Check validity

if enemy != nil && enemy.is_valid() {
    debug.log(enemy.health)
}

Capabilities

An Entity's physics, animation, and appearance handles expose different controls. Appearance-specific controls are not implemented yet. See the Entity API and Physics API.

[BETA] marks features newer than the current public release. Current release: 0.8.0.