Chest spawns pause

In my game, im using multiple scenes and thus i cannot use pause and go to previous scene but I still want to make it so that i can make chests that have already been opened stay open no matter what. I thought of using a variable but then i would have to count every individual chest somehow

If you want others to be able to understand your issue, you have to be clearer than that. It’s difficult to understand what the issue is right now.

If I get this right, your player is in a scene and opens up chests, and then leave the scene to go to an other one. The play then comes back to the first scene, and the chests the player opened should appear as opened.

Basically, you want to save the progression of your player throughout the scenes of your game.

Something you could do is set a boolean object variable to every chest, and check, using events, that if a chest has this boolean variable set to true then it changes the animation for the “opened” state.

If you want the chests that have already been opened to stay opened even after the player restarted the game, then you’ll also have to use “Storage”, and save the X and Y positions of every opened chests (or via another way), and dynamically set this boolean object variable to true.

object variables reset when you leave the scene though, dont they

I’m not sure, try it and we’ll probably learn something new

Hi, you are right. Object variables from global objects are not global themselves and thus reset when transitioning to another scene.

There is probably no other way than doing that and you need global variables. To keep track of all chests across multiple scenes you could organize the global variables for each chest in a global structure variable for each scene.