Skip to main content
Script Properties allow you to attach Lua scripts to any element in the level. Each element (level, block, side, item, enemy, ball, decoration) can have its own script with custom tags and variables.

Opening Script Properties

From the Element Properties panel (V), click Script (or Block Script / Side Script for blocks).

Configuration

Script Reference

The name of the script in the level’s script collection. You can:
  • Type the script name directly in the input field
  • Click More Scripts to open the Script Editor in select mode

Script Tag

A string identifier for this specific element instance. Tags are used in Lua scripts to identify which entity triggered a hook or signal. Example: If you tag an enemy as "boss_01", your script can check self.tag == "boss_01" to apply boss-specific behavior.

Local Variables

Key-value pairs accessible from the script. These are stored as LuaLocalVariablesDefinitions on the element.
  • Click New Variable to add a variable
  • Enter a variable name and value
  • Variables are accessible in Lua as self.vars["variableName"]

Supported Element Types

Variable Management

Creating Variables

  1. Click New Variable in the Script Properties panel
  2. Enter a variable name (must be unique)
  3. Select the variable type (String, Integer, Float, Boolean)
  4. Set the initial value
  5. Click Accept

Editing Variables

  • Click on a variable’s value to edit it
  • Changes are applied immediately

Deleting Variables

  1. Click the remove button on a variable
  2. Confirm in the popup
  3. The variable is removed from the element

How Scripts Use Properties

In Lua scripts, element properties are accessed through the self object:
Script variables are per-element instance. Two enemies of the same template can have different variable values, allowing unique behavior for each instance.