If they Type a certain name - Please help

I need help figuring out how to do this. I give them the option to type their own name for their character, I know how to do that. I want to do it so that if they type a certain name that I’ve decided ‘Bob’ then it sets the bob variable true, so I can then use if statements to say a certain message, but only if they typed Bob. I saw people talking about this, how do I do it?

The way I see this (note: I might be incorrect);

*create name ""

  #What's your name?
    *input_text name
    *if (name = "Bob")
      Hi, your name's Bob. That's cool. My name is Bob too.
      *goto next

      Hi, ${name}!. My name's Bob. Glad to meet you.
      *goto next

*label next

Or just follow @Loudbeat’s method; their method’s more optimized than mine.

*create typed_name ""
*create compared_name "Bob"

*if typed_name = compared_name
  this happens if they type Bob.
  nothing happens

Something like that should work I think…


No need to go roundabout.

What is your name?
*input_text name

*if name = "Bob"
   Well well, who is this if not the generic protagonist: Bob.

That worked, thanks so much.

1 Like

I might try that as well. Looks good, thanks.

Question resolved!