I'm working on a topdown shooter where I use groups to activate and deactivate what type or ennemies are spawned by the game.
I use a "Reset Layout" function to restart the "game" layout when the game is over and it works well as it reset all groups to their initial state.
However I wanted to add the option to go back to the main menu and from there be able to start a new game.
What I did was to give 2 options to the player when he is game over.
-Press R to restart: This work well
-Press M to return to menu: This kinda not work.
The thing is that yes I can load my "Menu" layout fine but when I go back into the game after going back to the menu, the active/inactive states of the group in the "Game" layout is as it was when player died instead of resetting to its original values (as it does with a reset layout function)
I tried many things but I can't figure out how to do this. Have anyone been able to do something similar?
Thanks a lot for your help