I'm having trouble with setting a value to my variable Name when the player choses to be named Hannah (it won't appear in Show Stats)

*choice
    #Hannah
      *goto hannah2
      *if Nombre = ""
        *set Nombre "Hannah"
    #Eligir otro nombre
      *label nombre
      Escribe tu nombre abajo
      *input_text Nombre
      ¿Tu nombre es ${Nombre}?
*choice 
    #Sí
      *goto hannah2
    #No 
      *goto nombre

I tried an if statement, but it still doesn’t work. I probably wrote the if statement wrong, or I might not be supposed to use one for what I want.

  1. When the player picks the first choice (“Hannah”), the code sends them directly to hannah2 before doing the “set Nombre “Hannah”” bit … which means “set Nombre “Hannah”” never happens. We’re directed elsewhere before getting a chance to do that.

  2. I think the second choice needs to be indented up to the same level as the *label nombre block.

1 Like

The first thing you said turned out to be right. The second thing you said I´m not sure, I didn´t try changing it. Anyways, I don´t need to change it because the script is working fine now. Thanks.:+1: