Page 1 of 1

Any way to make a separate file containing different codes?

Posted: Mon Nov 08, 2021 6:19 pm
by LunarCatUSA
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?

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

Posted: Fri Nov 12, 2021 7:37 am
by deice
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.