GlobalData and LevelData libraries

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

MrDoubleA
Ripper II
Ripper II
Posts: 394
Joined: Mon Aug 20, 2018 7:02 am
Flair: How much munchers?

GlobalData and LevelData libraries

Postby MrDoubleA » 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:

Code: Select all

local GlobalData = require("globalData")
local LevelData = require("levelData")

GlobalData.abc = 1
LevelData.def = 2
Download

Return to “LunaLua”

Who is online

Users browsing this forum: Alexx0612 and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari