Skip to main content
RollingQuest scripts expose several additional enums beyond the core entity and direction types. This page documents eight of them — covering how the ball jumps, where the camera looks, what resource formats a campaign uses, how enemies interact with the world, how entities move, compass-point orientations, water-pool behavior, and level theme variants. Each section lists all values in a table and provides context for when you use the enum in your scripts.

BallJumpMode

The BallJumpMode enum controls how the ball handles jumping. You set this mode on the ball or a surface to allow normal jumps, force continuous bouncing, or disable jumping entirely.
ValueNumberDescription
BallJumpMode.Banned0Jumping is completely disabled; the ball cannot leave the surface by jumping.
BallJumpMode.Normal1Standard jumping behavior — the ball jumps once per input.
BallJumpMode.Bouncing2The ball bounces continuously without requiring player input.
-- Disable jumping on this surface block
block:setBallJumpMode(BallJumpMode.Banned)

-- Restore normal jumping when the player reaches a checkpoint
function onCheckpointReached()
    Ball.setJumpMode(BallJumpMode.Normal)
end

CameraLookPosition

The CameraLookPosition enum adjusts the vertical tilt of the camera, letting you direct the player’s view upward, downward, or back to center. You pass it to camera control functions to shift focus without moving the camera’s world position.
ValueNumberDescription
CameraLookPosition.Center0Camera looks straight ahead at the default horizon level.
CameraLookPosition.Up1Camera tilts upward to reveal overhead scenery or obstacles.
CameraLookPosition.Down-1Camera tilts downward to show the surface below the ball.
-- Tilt the camera up when approaching a tall structure
function onEnterTowerZone()
    Camera.setLookPosition(CameraLookPosition.Up)
end

-- Return to center when leaving the zone
function onExitTowerZone()
    Camera.setLookPosition(CameraLookPosition.Center)
end

CampaignResourceType

The CampaignResourceType enum classifies the format of a resource file bundled with a campaign. You use it when loading or querying campaign assets so the engine knows how to parse and handle the data.
ValueNumberDescription
CampaignResourceType.Unknown0The resource format is unrecognized or unspecified.
CampaignResourceType.Binary1Raw binary data (e.g., compiled assets or custom data blobs).
CampaignResourceType.Text2Plain text data (e.g., dialogue files or configuration).
CampaignResourceType.Json3JSON-formatted structured data.
CampaignResourceType.Image4An image file (e.g., a texture or UI graphic).
-- Load a JSON config file bundled with the campaign
local config = Campaign.loadResource("settings.json", CampaignResourceType.Json)

-- Load a plain-text dialogue file
local dialogue = Campaign.loadResource("intro.txt", CampaignResourceType.Text)

EnemyInteraction

The EnemyInteraction enum identifies which types of level hazards and mechanics an enemy is capable of interacting with. You use it to query or configure how a specific enemy responds to environmental elements like spikes, lasers, ice, and magnets.
ValueNumberDescription
EnemyInteraction.Spikes0Enemy can interact with spike hazards.
EnemyInteraction.Lasers1Enemy can interact with laser beams.
EnemyInteraction.Teleports2Enemy can use or be affected by teleporters.
EnemyInteraction.Buttons3Enemy can activate buttons.
EnemyInteraction.LightSensors4Enemy can trigger light sensors.
EnemyInteraction.DirectionRestrictions5Enemy is affected by directional restriction blocks.
EnemyInteraction.Ice6Enemy slides or behaves differently on ice surfaces.
EnemyInteraction.Fire7Enemy interacts with fire hazards.
EnemyInteraction.BreakingBlocks8Enemy can walk on or destroy breaking blocks.
EnemyInteraction.TrampsAndVents9Enemy is affected by trampolines and vents.
EnemyInteraction.Magnets10Enemy is attracted or repelled by magnetic blocks.
EnemyInteraction.Rotators11Enemy is affected by rotator elements.
EnemyInteraction.BallShield12Enemy interacts with the ball shield mechanic.
EnemyInteraction.InvisibleBlocks13Enemy can detect or collide with invisible blocks.
-- Check if an enemy can interact with ice before enabling an ice puzzle
function onIcePuzzleActivate(enemy)
    if enemy:hasInteraction(EnemyInteraction.Ice) then
        enemy:setPathSlippery(true)
    end
end

EntityMoveType

The EntityMoveType enum describes the kind of movement an entity is currently performing. You read this value from movement callbacks or query it on an entity to determine how to respond — for example, playing a specific animation or sound only when the entity is genuinely airborne versus rolling forward.
ValueNumberDescription
EntityMoveType.None0The entity is not moving.
EntityMoveType.Ahead1The entity is moving forward horizontally.
EntityMoveType.Up2The entity is moving upward.
EntityMoveType.Down3The entity is moving downward.
EntityMoveType.RotateLeft4The entity is rotating to the left.
EntityMoveType.RotateRight5The entity is rotating to the right.
EntityMoveType.JumpUp6The entity is jumping upward.
EntityMoveType.JumpAhead7The entity is jumping forward.
EntityMoveType.Falling8The entity is in free fall.
EntityMoveType.SideDown9The entity is moving diagonally downward along a side.
-- Play a special sound when the ball jumps forward
function onBallMove(moveType)
    if moveType == EntityMoveType.JumpAhead then
        Audio.play("jump_forward")
    elseif moveType == EntityMoveType.Falling then
        Audio.play("falling_wind")
    end
end

Orientation

The Orientation enum represents the four compass-point directions on the horizontal plane. You use it to set or read the facing direction of entities and level elements that are aligned to a cardinal axis — such as an enemy’s initial heading or the direction a one-way gate allows passage through.
ValueNumberDescription
Orientation.North0Facing north (positive Z axis by convention).
Orientation.East1Facing east (positive X axis by convention).
Orientation.South2Facing south (negative Z axis by convention).
Orientation.West3Facing west (negative X axis by convention).
-- Spawn an enemy facing east
enemy:setOrientation(Orientation.East)

-- Redirect an enemy to face south when it hits a wall
function onEnemyHitWall(enemy)
    if enemy:getOrientation() == Orientation.North then
        enemy:setOrientation(Orientation.South)
    end
end

PoolMode

The PoolMode enum controls the behavior of a liquid pool in the level. You apply it to a pool entity to choose whether the water level is fixed, dynamically adjusted by the engine, or animated as a rising-and-falling tide.
ValueNumberDescription
PoolMode.Disabled0The pool is inactive; no liquid is rendered or simulated.
PoolMode.Static1The liquid level is fixed at a set height and does not change.
PoolMode.AutoAdjust2The engine automatically adjusts the liquid level based on gameplay events.
PoolMode.Tide3The liquid level rises and falls in a periodic tide pattern.
-- Start the level with the pool disabled, then enable it as a rising tide
function onLevelStart()
    pool:setMode(PoolMode.Disabled)
end

function onTriggerActivated()
    pool:setMode(PoolMode.Tide)
end

ThemeMode

The ThemeMode enum selects the visual theme variant applied to a level. Normal and secret variants exist for the base theme as well as three additional variant sets, letting you create alternate visual presentations of the same level geometry — for example, a secret hidden version with a different atmosphere.
ValueNumberDescription
ThemeMode.Normal0The standard default theme for the level.
ThemeMode.Secret1The secret variant of the default theme.
ThemeMode.KulaWorld2The KulaWorld-inspired theme variant.
ThemeMode.KulaWorldSecret3The secret version of the KulaWorld theme.
ThemeMode.Variant14The first alternate theme variant.
ThemeMode.Variant1Secret5The secret version of Variant 1.
ThemeMode.Variant26The second alternate theme variant.
ThemeMode.Variant2Secret7The secret version of Variant 2.
ThemeMode.Variant38The third alternate theme variant.
ThemeMode.Variant3Secret9The secret version of Variant 3.
-- Apply the secret theme when the player discovers a hidden area
function onSecretAreaEntered()
    Level.setThemeMode(ThemeMode.Secret)
end

-- Switch to the KulaWorld theme for a special challenge section
function onChallengeStart()
    Level.setThemeMode(ThemeMode.KulaWorld)
end