Skip to main content
The LevelData class represents the complete data structure of a level — its blocks, enemies, balls, items, messages, scripts, and global settings. This is the universal format used by both the in-game level editor and the campaign system. You can access LevelData in the OnLoadLevel campaign hook to modify level data before the level starts playing.
During gameplay you cannot create or destroy entities. You can only enable/disable existing ones. The LevelData API is for modifying the level’s design data before it loads, not for runtime entity creation.

Properties

Message Methods

Script Methods


Modifying Level Data with OnLoadLevel

The OnLoadLevel campaign hook receives a LevelData object before the level starts. You can modify level settings, but you cannot create or destroy entities — only change parameters.

Hook Signature

What You Can Modify

Example: Dynamic Difficulty

Example: Adjust Lives Based on Progress