[SOLVED]Can you assign your main character two names?
Posted: Thu Mar 30, 2017 5:46 pm
Hello! I'm really sorry if this is a really noobish question or anything, but I've tried to look everywhere and came up with no exact results for what I was looking for.
I'm having a bit of trouble trying to assign two names to the protagonist of my story. I want players to have the option of naming the MC if they want to or just leaving her name as the default. Problem is, the way I have it set up is by giving the player an option to name her inside a menu like so:
I have the MC defined like this for reference:
My problem lies with the fact that I have no idea if you can still refer to the MC with her default name if the player chooses the first option and decides not to name the MC. I can only get it working when I choose the second option to name her since she's defined as [player_name], but I really want to know if you can assign two names to this character so that if you choose the first option and never go into the menu to change her name, you'll only see her default name. I'm really sorry if this seems confusing since I really have no clue how to go about doing this.
Thank you so much for any help!
I'm having a bit of trouble trying to assign two names to the protagonist of my story. I want players to have the option of naming the MC if they want to or just leaving her name as the default. Problem is, the way I have it set up is by giving the player an option to name her inside a menu like so:
Code: Select all
n "Do you want to leave the default name?"
n "Or do you want to input your own name?"
menu:
"I want to leave the default name":
jump default
"I want to input my own name":
jump yourname
label default:
n "Default name it is!"
jump next
label yourname:
n "Then tell me your name."
$ player_name = renpy.input ("What is your name?", "Heidi")
$ player_name = f_name.strip()
if player_name == "":
$ player_name = "Heidi"
jump nextCode: Select all
define h = Character ("[player_name]")Thank you so much for any help!