Any way to make a separate file containing different codes?

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

LunarCatUSA
Monty Mole
Monty Mole
Posts: 115
Joined: Sat Mar 06, 2021 9:56 am
Flair: Soda-Butler

Any way to make a separate file containing different codes?

Postby LunarCatUSA » Mon Nov 08, 2021 6:19 pm

Say that I wanted a level script to read a massive list of tables and different things, but it will take up truck loads of space in the level script. Is there anyway I can make a separate script containing lines and tables and what not?

deice
Volcano Lotus
Volcano Lotus
Posts: 596
Joined: Fri Jul 23, 2021 7:35 am

Re: Any way to make a separate file containing different codes?

Postby deice » Fri Nov 12, 2021 7:37 am

if i'm understanding you correctly, you have a bunch of static data you want to load into and use within your level.
since smbx2 comes prepackaged with lunajson, you can stick that data into a json file and read it from there.

if i'm not understanding you correctly and you just want a set of lua structures that you can have access to in multiple levels, then you'll want to write a library.


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari