LevelData.lua

Download Latest Version

LevelData is a small library which wraps around the UserData functions, making level-specific variables easier to manage.

Installation
Drop the LevelData.lua file in the LuaScriptsLib folder.

How to use
First, load in the API. Then you can use LevelData functions as you would use UserData functions, to save, load, and manage custom saved variables.

Example
This will increment a value saved in the UserData variables, but crucially, the same value can be used in multiple levels, and will not clash with each other, allowing each level to keep track of their own variable. If used on the overworld, this library will also create a variable for the overworld.

External Use Functions
These are functions you will need to use the library