define m_name_default = "Joseph" #define the default names
define f_name_default = "Erika"
default m_name = m_name_default #assign the default names as the initial names during the start of the game
default f_name = f_name_default
define m = Character("[m_name]") #use the name variables as the character names
define f = Character("[f_name]")
label name_input: #create a label that we can call to input the name
menu:
"Male":
$ is_male = True #create and set a variable depending on the chosen gender
"Female":
$ is_male = False
$ input = renpy.input("What is your name?").strip() # .strip() removes any trailing or leading white spaces in the user's input
if is_male: # if gender is male we will assign the input to the m_name variable
$ m_name = input if input else m_name_default # if input is not empty then use it, otherwise default to the default name
else:
$ f_name = input if input else f_name_default
return
label start:
"Male name: [m], Female name: [f]"
jump main
Here's what I was hoping to be able to do. I want, at some point to have another character give your player character a nickname, 'Boy' for the male and 'Girl' for the female. I don't want the game to get rid of the player entered names though, because these nicknames will only be temporary. Is there a way to make the game switch between the nickname and the original name without deleting the original name? If so, how could I do this? Please help me, thank you