#Pause menu
7 messages · Page 1 of 1 (latest)
Is your root node set to "pauseable"? It's under process. Also, the default pause method is get_tree().paused = true / false and it will halt all actions in the scene. Anything that is supposed to still work (like your pause menu) should have the process type "When paused"
Also in terms of your code's complexity, you could just (in _process(delta)) listen for the Esc keypress, if so pause the game with get_tree().paused = true and change the visibility of/instantiate your menu (which has the "when paused" process chosen). Either add a way to unpause via a button in there or make the esc button flip between the bool
From a quick glance, it looks like get_tree().paused = !game_paused should be get_tree().paused = game_paused instead.
That also explains the behavior of pausing on closing the pause menu
Thank you Erebos For the tips!