Reference
Everything a script can use, a page for each part. The same words show in the editor, under the mouse and in the list that offers what could come next.
- The basics: Functions every script has, whatever it does.
- math: Numbers. There is no math.random: random numbers are the random library's.
- string: Text. Every string also has these as its own: ("hello"):upper(), name:sub(1, 3).
- table: Lists and tables.
- utf8: Text by its letters, in any language (a string's own places count bytes).
- time: The level's clock.
- task: Tasks: functions that run beside each other, each waiting when it likes.
- coroutine: Coroutines: functions that stop half way and carry on later, by hand.
- signal: Events of your own.
- An event: What every event has: the game's (level.beat, thing.touched...) and your own.
- A connection: What connect gives back.
- random: Random numbers: the level's own generator, or generators of your own with a seed.
- debug: Finding out where a script is.
- level: The level being played.
- things: Finding the level's things, and making new ones.
- A thing: An object, a piece of floor, a text or a group. Besides what is listed here, every number its rows show in the editor can be read and set by its id: thing.alpha, thing.color.r, thing.blur.amount, thing.particles.rate.
- player: The player's cube.
- camera: The camera. Its children's numbers are read and set by their ids: camera.vignette.density, camera.blur.amount. The theme's colours are theme.water.r and the like.
- input: The keyboard and the mouse, while the level is played. (Escape always pauses: scripts never see it.)
- sound: Sounds.