Text box

Let the player type a name or an answer, then read what they typed in a rule.

Chocobreak — NutHouse
A new Text box with Grey hint while empty, Most letters, Box width and style
A new Text box. The grey hint tells the player what to type.

What a text box is

A box the player types into, like their name or a quiz answer. The player clicks it, types, and presses Enter. Your rules can then read the words with Text("Name box").

Text box appears in Advanced and Expert mode.

How to add one

  1. Switch to Advanced at the top if you are in Simple.
  2. Click + Add object, then New, then Text box.
  3. Name it Name box. Type Your name… in Grey hint while empty.
  4. In the Events tab, make a rule for The player presses Enter on it.

What the settings mean

Grey hint while emptyFaint words shown until the player types. They vanish as soon as typing starts.
Most lettersThe longest thing the player can type.
Box widthHow wide the box is on the screen.
StyleSize and colour of the writing.

Rules for text boxes

The player presses Enter Start typing in it Empty it

The box's words are Text("Name box") in any formula. Two common uses:

WhenStart of level
DoStart typing in Name box
WhenThe player finishes typing in Name box (presses Enter)
DoSet text of Greeting to "Hi " + Text("Name box")Go to the next level

For a password, use Compare two values in the ⚙ Special column: Text("Name box") = "open sesame". For a high-score table, give Add the score to the table the name Text("Name box").

Still stuck?

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