How do we allow readers to input a code via choices?

i’m pretty sure this was the kind of thing you were asking for. this template has the code “1234”, so you can customize it to your liking and add your own code.

label input_digit1
NARRATOR
Enter the first digit of the code.
choice
"1"{
NARRATOR
Correct!
goto input_digit2
}"2"{
NARRATOR
Incorrect! Try again.
goto input_digit1
}"3"{
NARRATOR
Incorrect! Try again.
goto input_digit1
}"4"{
NARRATOR
Incorrect! Try again.
goto input_digit1
}
label input_digit2
NARRATOR
Enter the second digit of the code.
choice
"1"{
NARRATOR
Incorrect! You have to start over now.
goto input_digit1
}"2"{
NARRATOR
Correct!
goto input_digit3
}"3"{
NARRATOR
Incorrect! You have to start over now.
goto input_digit1
}"4"{
NARRATOR
Incorrect! You have to start over now.
goto input_digit1
}
label input_digit3
NARRATOR
Enter the third digit of the code.
choice
"1"{
NARRATOR
Incorrect! You have to start over now.
goto input_digit1
}"2"{
NARRATOR
Incorrect! You have to start over now.
goto input_digit1
}"3"{
NARRATOR
Correct!
goto input_digit4
}"4"{
NARRATOR
Incorrect! You have to start over now.
goto input_digit1
}
label input_digit4
NARRATOR
Enter the fourth digit of the code.
choice
"1"{
NARRATOR
Incorrect! You have to start over now.
goto input_digit1
}"2"{
NARRATOR
Incorrect! You have to start over now.
goto input_digit1
}"3"{
NARRATOR
Incorrect! You have to start over now.
goto input_digit1
}"4"{
NARRATOR
Correct! You entered the entire code correctly. You can continue the story now.
}
1 Like