Hoeloe wrote: ↑2 years ago
None of that is really valid to do. First off, don't use onLoopSection, use onTick and check for the player's section.
Second, don't load libraries inside functions unless you have a REALLY good reason. Just load what you need at the top of the file.
Third and most importantly, you can't grab a list of blocks and use it later expecting it to stay up to date. Same is true of NPCs, BGOs, etc. You must grab a new list every time you want to use them, otherwise you're just asking for errors like this as you attempt to access invalid memory.
Okay, I took your advice, Hueylou, and I changed the code around, and now, whenever a bonus block gets hit, it calls an event called "Bonus Block Hit", which sets "getPrize" to "true". Now, when the ice block dies, the floor gets covered with a layer of invisible triggers (REEEEEEE) that finish the bonus game once and for all. And right now, the think the bonus game is all set for now! Thanks~! :D
Only one problemo...each block has the same contents in order, and the content identities are in the same order. I just want the table of contents to have its pages become randomized when Mario enters the room, so that the bonus room will be ready for Klonoa to try out. How would you randomize a table in LunaLua?
Enjl wrote:Fourth: Capitalization matters.
Well, you're not wrong. I mean...