A hidden level with a password

By the end your start screen will have a box for a secret code, and the right code will jump straight to a hidden level.

What you need

The Text box and Compare two values are Advanced. Switch to Advanced mode.

Code box+ Add object โ†’ New โ†’ Text box. Grey hint while empty: Secret code? Most letters: 4. Name it Code box.
Hidden levelA level called Secret, at the very bottom of the Game tab.
Wrong textA Text saying Nope! with Visible when the level starts unticked.
SoundsPower up and Power down.

Build it

The code is a number, like 1234. NutHouse compares numbers, so a word will not work here.

  1. In the Game tab, click + Add level, name it Secret, and drag it to the bottom. Nothing goes to it with Next level, so it stays hidden.
  2. On your start screen, add the Code box in a corner.
  3. Events tab โ†’ + New event โ†’ Code box โ†’ The player presses Enter.
  4. + andโ€ฆ โ†’ โš™ Special โ†’ Compare two values. First value: Val(Text("Code box")). Comparison: = equal to. Second value: 1234.
  5. In ๐ŸŽฌ Game choose Jump to a level and pick Secret from the list. Play Power up.
  6. Right-click the row โ†’ Duplicate. On the copy, click the compare chip โ†’ Change settingsโ€ฆ and make it โ‰  not equal. Change the actions to Show Nope!, Empty it on the Code box, play Power down.
  7. Press โ–ถ Play level. Type 9999: Nope. Type 1234: you are in.
WhenThe player presses Enter in Code boxVal(Text("Code box")) = 1234
DoJump to level SecretPlay sound Power up
WhenThe player presses Enter in Code boxVal(Text("Code box")) โ‰  1234
DoShow Nope!Empty Code boxPlay sound Power down

Val turns the typed text into a number. Text("Code box") is the typed text. Both are in the ฦ’x helper.

Make it yours

  • Give the code out in the game: a Sign sprite in the last level with the number on it.
  • Several codes: more rules, each with its own number and Jump to a level.
  • Let players skip ahead: code 2 jumps to level 2, code 3 to level 3.

Still stuck?

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