Persistent Lua Scripts
Posted: Wed Mar 09, 2022 1:37 pm
Hello! I had more of a "core way lunalua engine works with SMBX" question, if anybody knows the answer off the top of their heads. As far as I can tell, whenever a new level is loaded within SMBX, all the lua scripts reset. There are, of course, ways of getting data to persist across these refreshes, like with the newer GameData.___ and so forth, but the .lua files themselves still restart every time a new level loads. I'm wondering if there are any lua files that do not reset and are always running even when transitioning from one level to another? (Maybe any of the base engine scripts like main.lua?) Or if there are ways of making a lua script behave this way? I figured the answer is no, but just wanted to confirm if anyone knew. Thanks to anyone who takes the time to read this and/or offer help. Very appreciated!