Pause Menu and Overlay Scene questions

I followed this video : to create a “Pause Menu” on my game.
So basically, to create it, I added a keyboard sensor on my main scene to add an overlay scene.
On the second (overlay) scene, I added a keyboard sensor to assign a property to 1 and when the property is equal to 1, it resumes the main scene and deletes the second (overlay) scene.

So what i wanted to ask you is :

  • Why do the overlay scene suspends the main scene without a “scene suspend” actuator ? How can I avoid that (in case I want to do something different like an interface or anything else) ?
  • Why do I need to add a property in the second scene ? Why doesn’t it work if I just link the “resume scene” and “delete scene” to a keyboard sensor ?

Thanks in advance !

1: it shouldn’t suspend the main scene. Overlay scenes are easily the best way to make HUDs. You might have a Pause actuator active somewhere…
2: You don’t. It should work if you use a keyboard sensor and just tack it on to the scene actuators.

MichelleSea is exactly right. The reason for the property is so that we can hide the mouse cursor before resuming the scene. This assumes that you want to hide the mouse cursor. Like MichelleSea said, it will work without the property if you don’t need to hide or show the mouse cursor.

The bit that pauses the game scene (or background scene) is shown at 4:30 in the video.

Oh you’re right about the scene’s suspending. As it has been a while since the last time I’ve taken a look at my .blend, I forgot that I had assigned the actuator to my camera.

However when I replace the property sensor with a keyboard sensor (keyboard - AND - Remove second scene + Resume main scene), it does delete the second scene but doesn’t resume the main scene.
EDIT : Nevermind, I’ve just put all the actuators on the same mesh and it works well.
I don’t know why the person who recorded the video separated them.

Thank you !

Try putting the Resume actuator above the Remove actuator.
If that doesn’t work, use two controllers, one connecting to one of the actuators each and connecting both to the keyboard sensor. Then add a Delay sensor to the Remove controller/actuator.

I guess my thought was that it didn’t make sense to have the thing that pauses the scenes on the resume button. But it is completely up to you, the tutorial is intended to sort of hand you the pieces, and you can figure out how those pieces fit into your specific game. I suppose. :slight_smile: