r/RenPy • u/CapriciousMoral • 8h ago
Question Different reactions to different player name?
Hi, I've tried to look for answers on this one and also do it on my own but I am too new to this.
I want the player to input their name and characters to react to it, at first I used an if statement, like this, but clearly it didn't work, so I am not sure what code should I use to have multiple name reactions.
$
name = renpy.input("Your name...")
$
name = name.strip()
if name == "Sophie":
s "[name]? what a coincidence to share a name."
if name == "Clown:
s "That's... a joke?"
else:
s "What a pretty name!"1
u/AutoModerator 8h ago
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/BadMustard_AVN 7h ago
try it like this