Equality between string variables?

So basically, I’m allowing players to adopt a dog [and to give it a custom name, by extension]

However, I’d like for their to be custom text if the player names it something specific, [eg: If they name the dog after a RO or something similar, I’d like the RO to have a custom response]

Here’s the gist of what I got:

*input_text dogname

*if (dogname=“Ranger”)
[Insert custom response from RO here]

*if (dogname != “Ranger”)
[insert generic response here]

Now all that works fine and well, but what do i do in case the player names the dog ‘ranger’ (with a lower case ‘r’ instead of an upper case one)

Is there any neat way around this? Trying to factor in for the capitals is confusing me here

This should do the trick. It’s interpolating the dog’s name in a new string and forcing it to all caps, then comparing to the upper-case version of the name you want.

*if ("$!!{dogname}" = "RANGER")
    "That's my name!"
*else
    "Aw, cute doggo!"
3 Likes

This works perfectly!! Thank you

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.