Do tables clear themselves on a scene reset?
owen_dennis
Just a guy, you know.Member, PRO Posts: 236
I have a game where the majority of the gameplay takes place in one scene. I have a number of enemies that get randomly spawned and many of them use hitboxes, so I have a rule set up to let each enemy creates a new row to store its hitbox x y information. When I reset the level, do those tables get cleared of all that information? I just want to know so I'm not filling up tables, then when the level resets, those tables have a whole bunch of worthless information in them taking up space. It only just occurred to me that they might be keeping that information because they're a game attribute and not a scene attribute.
Comments
Tables do not reset unless you exit the app and re-launch it. Best practice is to copy the table you're using into a separate table (as a backup) and then when you need to reset the level, copy that table back into the main table you're using in your rules.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Cool, thanks for the info! Yeesh though, I've got like 7 tables that would need copying. Would copying a bunch of tables every time you restart a scene significantly impact performance?
Vote for Nearest Neighbor Scaling option in gamesalad! Let's make our games look truly stunning!
I wouldn't worry about it. Or rather, try it and see. Setting up two Copy Table behaviors for each of the 7 tables isn't really that much work.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User