Skip to main content
The EntityType enum classifies every object in a RollingQuest level into one of eight categories. You pass these values wherever the API needs to know what kind of entity you are targeting — for example, when broadcasting a signal to all entities of a particular class with Signals.emitToType(), or when filtering callbacks that fire for multiple entity kinds. The special value Any acts as a wildcard that matches every category at once.

Values

ValueNumberDescription
EntityType.Level0The level itself, treated as a single top-level entity.
EntityType.Block1A static or dynamic block that makes up the level geometry.
EntityType.Side2An individual face or side element attached to a block.
EntityType.Item3A collectible item placed in the level.
EntityType.Enemy4An enemy character that can interact with the ball.
EntityType.Ball5The player-controlled ball entity.
EntityType.Decoration6A purely visual decoration object with no gameplay logic.
EntityType.Any-1Wildcard — matches all entity types in filtering and signal APIs.

Usage Example

The example below shows how you can send a signal to every Block entity in the level, then separately send a different signal to every Enemy, and finally use Any to broadcast to all entities at once.
-- Emit a signal to all blocks in the level
Signals.emitToType(EntityType.Block, "onLevelStart")

-- Emit a signal to all enemies
Signals.emitToType(EntityType.Enemy, "onAlertEnemies")

-- Emit a signal to every entity regardless of type
Signals.emitToType(EntityType.Any, "onReset")
You can also read the type of a specific entity at runtime and branch on it:
local function handleEntity(entity)
    if entity:getType() == EntityType.Item then
        -- collect the item
        entity:collect()
    elseif entity:getType() == EntityType.Enemy then
        -- stun the enemy
        entity:stun()
    end
end