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 level | A level called Secret, at the very bottom of the Game tab. |
| Wrong text | A Text saying Nope! with Visible when the level starts unticked. |
| Sounds | Power up and Power down. |
Build it
The code is a number, like 1234. NutHouse compares numbers, so a word will not work here.
- 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.
- On your start screen, add the Code box in a corner.
- Events tab โ + New event โ Code box โ The player presses Enter.
- + andโฆ โ โ Special โ Compare two values. First value:
Val(Text("Code box")). Comparison: = equal to. Second value: 1234. - In ๐ฌ Game choose Jump to a level and pick Secret from the list. Play Power up.
- 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.
- 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.