I'll try to explain it to the best of my abilities, because I find the the formal way of describing it too confusing to me:
When the player chooses his name, I would like multiple names to be replied to the same way, be it because of similar meanings or changes in letters, say, Fireman and Firefighter, Ethan or Etan. The question is, how can I accomplish this without making a separate code for each name and instead summarizing all names to one code?
Here is a relevant fragment of the code I have right now:
Code: Select all
define na = Character("???")
define pl = Character("You")
define plchange = Character("[name]")
$ name = renpy.input("My name is...")
$ name = name.strip()
if name == ("Ethan" or "Etan"):
$ name=("Ethan" or "Etan")
scene face_evil
na "Welcome to the family, son."
pause.3
scene face_default
play sound prhuff
na "Just kidding, I don't know my family."
pause.2
jump after_give_name
label after_give_name:
na "Hm, seems cool."
na "Mine's Prosnorkulus."
plchange "Correct, my name should be changed now."
pl "Otherwise, here's my regular name."
Is there a way to cut down on the work or is there no other choice? Being able to do this would seriously make names more fun and advanced, say, six names that have the same reply!
Thanks for the help!