+1 vote

I'm following Godot's tutorial for pausing a game here. Under the root node for my scene, I have the "main scene" that I want to stop when pausing, and I also have a hidden "pause menu scene" that I show and want to process when pausing. The "pause menu scene" is instanced and has its "Pause -> Mode" property set to "Process". I have a "pause button" that the player can click to pause or unpause the game. Its pause mode is also set to "Process". No other pause modes for any other nodes have been changed from the default "Inherit".

The result is that, while the pause menu does appear, it acts as though it is paused. None of the signals in that sub-scene fire off, nothing animates, no process or _physicsprocess functions are called. I have a feeling that this has something to do with the fact that the pause menu is an instanced scene, since the button the player clicks to pause/unpause the game still processes, but it isn't instanced.

Godot version v3.2.3.stable.official
in Engine by (17 points)

2 Answers

0 votes

hi, have you tried to put in the pause mode process on the node where the script is?

by (14 points)

Do you mean that I should set the Pause -> Mode to "Process" on the node where the script is? Or do you mean that I should put the script on the pause menu node?

I have tried the former, since the latter would require a lot more reconfiguring. The node with the script is the root node of the scene. Setting its pause mode to "Process" caused two unwanted behaviors, one expected and one unexpected:
- The "main scene" continues processing (expected, since its pause mode is set to "Inherit", I would assume that it inherits the property to keep processing when paused from its parent node).
- The "pause menu scene" stops processing (unexpected, since its pause mode is set to "Process", I would assume that it would continue processing even when paused, but it didn't).

0 votes

I've discovered the reason why my pause menu was not working. The menu is made of pickable collision areas rather than buttons. During pausing, even though the _physics_process function is called, physics doesn't get simulated, which means the mouse_entered and mouse_exited signals that the menu relies on never get fired. Here's an issue filed on the Godot Github that explains what's going on: https://github.com/godotengine/godot/issues/39094.

The solution is to use proper Control GUI objects like Buttons to make pause menus, as they can still have their signals fire. And if you're trying to do something 3D that's pickable with the mouse, you're SOL.

by (17 points)

so im SOL... what a nice day.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.