hello, I’m looking for help on how to “loop”(?) my choice back to the first bit.
I want to allow players to choose their own name and I found the command to use the little text box. but what if they misspell or mistype and wish to correct it. how do I loop the text back to let them fix it?
What is your first name?
*input_text name
You name is ${name}, correct?
*choice
#That is correct.
*finish
#No, I wish to change it.
You need to label the initial choice of name. For example:
*label inputname
What is your first name?
*input_text name
You name is ${name}, correct?
*choice
#That is correct.
*finish
#No, I wish to change it.
*goto inputname
Since you wrote name in *input_text, you should do it like this:
*create name "Unknown"
EDIT:
Unfortunately no, I don’t know which WIP you’re referring to
But yes, it should use the same *create command, just with a different name for the variable (“parent_firstname” instead of “name”). If you have multiple characters that the player can name, you can use different variables for each character.
I was scrolling thru the forum and found somebody who would write their code with parent_firstname (not accurate, but I think you might know the one, they type of code, I’m referring to)
would it be the same code *create name “Unknown” on the startup page or would it look different?
thank you very much, worked like a charm!! does this mean that if the player chooses their name, because I added the box that allows them to write in their name, it still stay as the choice they made throughout the story as long as my code when referring to the player is ${firstname}
No problem! Yes, it will stay the same as long as you use the exact same variable name.
If you intend to use firstname, don’t forget to change the input name choice (and any other relevant commands) to use that variable. So, it will be *create firstname "Unknown" and *input_text firstname .