To explain what I need, I created two levels, each of them have two closed chests.
I have implemented a Finite State Machine (FSM) for each chest, where they go from Closed to Open state.
As with all game engines I’ve worked, when levels are loaded, the objects start too, so I need to somehow keep the state of the objects if the player visited that level and interacted with them. (in this case, the chests)
In my case, if I opened the chest at level one, and I’m going to level two, returning to level one, the chest must be open.
I do not mean to save a level, I’m not talking about saving the game, because this will save ALL the levels into one file, I’m talking about natural level changes that occur in all games when the player travel between them.
Thanks!