Help with a type in answer choice

I need help with how to code in a type in answer. I want to have it so the reader can type in a name and if they remember it then they call out for the character for help and if they don’t then they don’t get help and continue on.

Dara has a break down of typed in choices (https://www.dara-amarie.com/typed-in-choices) if you wanna check that out instead

For the situation you described, coding would probably be something like:

input What is their name? | What is their name? | Call Out(CALLNAME)

#correct input; replace CHARACTER with correct name
if (CALLNAME is “CHARACTER”) {

	MC
[*CHARACTER*]!! Help me!

} else {

#continue

}

1 Like

Ahh thank you! There’s 2 names that can be acceptable…Can I do that too?

Yup! You would just need to add “elif”; it’d look something like:

if (CALLNAME is “NAME1") {

	MC
[NAME1]!! Help me!

} elif (CALLNAME is "NAME2") {

	MC
[*NAME2*]!! Help me!

} else {

#continue

}

You can also add a goto and label if the two scenarios of the character getting help is the same

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.