Skip to main content
RollingQuest’s built-in Lua scripting system gives level creators full control over gameplay behavior — right inside the game. This page covers everything you need to get started writing scripts that respond to game events, control level state, trigger dialog, spawn projectiles, and orchestrate cinematic sequences, all without leaving the editor.

Introduction

Get an overview of how Lua scripting works in RollingQuest and what you can build with it.

Lua Basics

Learn the Lua fundamentals you need before writing your first RollingQuest script.

Script Editor

Explore the built-in script editor — syntax highlighting, error output, and live testing.

Hooks

Discover how hooks like OnStart, OnBallRoll, and OnDeath let your scripts react to game events.

Signals

Use signals to communicate between entities and coordinate behavior across your level.

Level API

Browse the full Level namespace API to control score, lives, timers, dialog, and more.

Getting Started

Follow these three steps to write and run your first RollingQuest script.
1

Open the Script Editor

Inside the level editor, select your level and open the Script Editor panel. This is where you write all of your Lua code — no external tools or setup required.
2

Write Your First Hook

Add an OnStart hook to run code the moment your level begins. For example, use it to display a welcome message, set the initial score, or trigger an opening camera sequence.
function OnStart(self)
    Dialog.createTemporary("Welcome to my level!", 3)
end
3

Test In-Game

Hit Play to launch your level directly from the editor. Your script runs immediately — check the output panel for errors and iterate until your level behaves exactly the way you want.