I ask for a password. I give them the correct answer. Later they have to put in the answer.
My dilemma is now this:
People might use like 15 ways to write the password in regard to upper and lower case and I just want one neat line of options and have the game check that one line.
Something that looks like this:
Code: Select all
define e = Character("Eileen") default password = ("crazy time", "Crazy Time", "CRAZY TIME", "Crazy time", "crazy Time") label start: $ code = renpy.input ("What time is it?") if code == password: jump right_code_white else: jump wrong_code_white label right_code_white: e "This was correct." return label wrong_code_white: e "This was wrong." jump start
I looked up if you can make Renpy case-insensitive and the answer seems to be no, so I need to specify all the different variations of this answer somehow.
I tried to look here and on google for an answer, but almost all replies are about character names or stuff where the answers are NOT essentially identical (like, if you type in jokes, you get a different reaction which is not what I want. There is only right or wrong). I assume maybe there is a thread out there with my answer, but I have no idea what the words to find it are.
But I DO assume that there is probably a way to assign multiple answers to a condition/string/variable/whatever those are called.
I KNOW that I could just do this and be "done" with it, but ugh, it looks so...horrible and frankly, it looks unnecessarily complicated.
Code: Select all
default password1 = "crazy time" default password2 = "Crazy Time" default password3 = "CRAZY TIME" default password4 = "Crazy time" default password5 = "crazy Time" default password6 = "CrAzY tImE" default password7 = "cRaZy TiMe" label start: $ code = renpy.input ("What time is it?") if code == password1: jump right_code_white elif code == password2: jump right_code_white elif code == password3: jump right_code_white elif code == password4: jump right_code_white elif code == password5: jump right_code_white elif code == password6: jump right_code_white elif code == password7: jump right_code_white else: jump wrong_code_white