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

In joseph evans “secret of the rain” story there’s this secret 4 digit code which u can enter with CHOICES like each choice has a number on it and u choose the correct sequence of digits and you can unlock the scene.

How do we do that aaaah. I think a couple years ago i saw someone explain it with coding but i forgot :sob::sob:

.uhmm… i think u can do two things…
gaining points with each secret code or just remember the choice?

1 Like

Yeah i figured so too but how would they check the correct sequence aah😭

You can use use if/elif/else code

Yeah but how would we check if the correct sequence of choices is being chosen

do you mean this?

1 Like

Ohh it’s definitely close but i was thinking how to do it with choice buttons :thinking: thanks btw!

uhmm… if u still have some confusion then …
okay… let’s do one thing
if u want your code to be 123
so you have to do the choices like…

choice
“1”{
@CHARACTER +1
}
“2”{
}
“3”{
}
and so on…
and just copy and paste it…and do it like
choice
“1”{
}
“2”{
@CHRACTER +1
}
“3”
}
and copy and paste it again…and
“1”{
}
“2”{
}
“3”{
@CHARACTER +1
}

hope u get it though…

1 Like

label start

NARR
Input the first digit.
choice
“1”{
NARR
That isn’t right!
goto start
}”2”{
NARR
That’s right!
}”3”{
NARR
Wrong number!
goto start
}”4”{
NARR
Seems wrong.
goto start
}

NARR
Input the second digit.
choice
“1”{
NARR
This is wrong!
goto start
}”2”{
NARR
It’s incorrect!
goto start
}”3”{
NARR
I got it right!
}”4”{
NARR
It’s wrong...
goto start
}

NARR
Input the third digit.
choice
“1”{
NARR
I did it!
}”2”{
NARR
Wrong.
goto start
}”3”{
NARR
It’s wrong...
goto start
}”4”{
NARR
Wrong.
goto start
}

In this example, it would redirect them to the start every time they got a digit wrong. To progress, they’d need to enter 231.
Is that the kind of thing you wanted?

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

Oh yes that makes sense sorry I’m dumb​:sob::heart: thanks btw!!!

1 Like

Oh ya thank you!!!

1 Like

If you want, you could also add code so that they only had so many tries to get it right before an alarm went off and there was trouble. If that’s something you’re interested in, let me know. I think I know how to do it.