Skip to main content

ScriptData

The ScriptData class represents a Lua script attached to a level element (level, block, side, item, enemy, ball, or decoration). Each script has a name and editable source code. Scripts are created and managed in the level editor.

Properties

Usage Example

Read an existing script’s info:

ScriptVariables

The ScriptVariables class provides a key-value store for passing variables to scripts attached to level elements. Each element (block, side, item, etc.) can have its own scriptVars that are accessible within its attached script. Variables are set at design time via the level editor.

Indexer

Get or set variables by name:

Usage Example

Read script variables from within a script: