A pause screen

By the end, pressing P will freeze the game and show the word Paused, and pressing P again will carry on.

What you need

Pause, or carry on if paused is Simple. The game is paused is Advanced, so switch to Advanced for the full recipe.

A gameAny level with something moving. Coin Quest from ๐ŸŽฎ Samples is a good one to try on.
Paused text+ Add object โ†’ New โ†’ Text. Words: Paused โ€” press P. Big size, white. Untick Visible when the level starts. Name it Paused.
A hintA small Text near the top: P pauses. Players cannot guess the key.
NutHouse
The Play panel while the game is paused

Build it

  1. Open the Events tab. Click + New event โ†’ โŒจ Keyboard & mouse โ†’ Upon pressing key. Click the button, then press P.
  2. In the โš™ Special cell choose Pause, or carry on if paused.
  3. + New event โ†’ โš™ Special โ†’ The game is paused. In the Paused cell choose Show.
  4. Right-click the row number and choose Duplicate. On the copy, click the condition chip and choose Make it the opposite (NOT). Change its action to Hide.
  5. Press โ–ถ Play level. Press P. Everything stops and the words appear. Press P again.
WhenUpon pressing P
DoPause the game, or carry on if it is paused
WhenThe game is paused
DoShow Paused
WhenNOT: The game is paused
DoHide Paused

Why two rules for the text? Rules that check The game is paused still run while paused. That is what lets the P key work again, and what lets the text show and hide.

Make it yours

  • Stay in Simple: one rule, Upon pressing P โ†’ Show Paused and Pause the game. A second, Upon pressing Space โ†’ Carry on (un-pause) and Hide.
  • Quiet when paused: add Set the volume of Music to 20 in the Show rule, and back to 100 in the Hide rule.
  • Dim the screen: draw a big dark sprite in the Sprite editor, hide it at the start, show it with the text. In Advanced, Make it see-through 50%.

Still stuck?

Try the Chocobreak tutorial, open a sample game and read its rules, or look at the questions people ask.