GlobalData and LevelData libraries
Posted: Wed Aug 24, 2022 1:10 pm
These are two tables that work similarly to SaveData/GameData.
- GlobalData is the same across all save files and saves in save-global.dat. Has a "flush" function.
- LevelData exists separately for each level, and is reset when they're beaten. When a checkpoint is collected, the data for all other levels will be reset. Has "clearCurrent" and "clearRest" functions.
Used like:
Download
- GlobalData is the same across all save files and saves in save-global.dat. Has a "flush" function.
- LevelData exists separately for each level, and is reset when they're beaten. When a checkpoint is collected, the data for all other levels will be reset. Has "clearCurrent" and "clearRest" functions.
Used like:
Code: Select all
local GlobalData = require("globalData")
local LevelData = require("levelData")
GlobalData.abc = 1
LevelData.def = 2