Please visit my website for more templates and guides!
https://www.dara-amarie.com/
Typed-in Choices
the code:
input Question? | Question? | Done (ANSWER)
-
“Question?” can be replaced by whatever you want your typed-in choice question to be. Most people use “What is your name?” to let readers type in their own names. Notice how Question? is repeated. You need to add in your question twice in the code.
-
The word “Done” can be anything you want it to be. This is the button you tap when you have completed typing in your choice. It can say “Finished”, “Unlock”, “Okay”, etc…
-
ANSWER inside of the parentheses () is what you are going to refer to the answer to. When you want your character’s to talk about the typed-in response, wrap straight brackets around the ANSWER, like this: [ANSWER].
-
The input code does not show on the web previewer. You will need to test this code using the app
Here are some examples:
input What is your name? | What is your name? | Done (NAME)
input What is the password? | What is the password? | Unlock (PASSWORD)
input Enter the 4 digit code. | Enter the 4 digit code. | Activate! (CODE)
input Text your boyfriend. | Text your boyfriend. | Send (TEXT)
NARRATOR
[NAME] is such a pretty name!
[PASSWORD] is not the correct password.
You typed in: [CODE]. That is incorrect.
BOYFRIEND
What did you mean when you sent me “[TEXT]”?
“Unlocking” typed-in choices!
Here I’ll show you how to “unlock” things by typing in the passcode, where readers cannot continue unless they type in the right words or numbers.
You’ll need to use labels, gotos, and the if/else code.
label unlock_code
input What is the passcode? | What is the passcode? | Unlock(CODE)
if (CODE is “Apple”) {
NARRATOR
Correct! You’ve unlocked the door!
} else {
NARRATOR
Code incorrect.
Please try again.
goto unlock_code
}
NOTE: “Apple” needs to be whatever your actual passcode is.
Typed-in Names on Top of Speech Bubbles
You can do either one of these to get the typed-in name on top of the character’s speech bubble:
- Replace the “ANSWER” in the code with the character’s script name, or
- Put the “ANSWER” as the display name of the character. You’ll continue to use the character’s script name in the script. (see image below for example)