Dont put a another label below this codes listed, when you typed a input, it will be automatically a label itself.Paul Kinsella wrote: ↑Tue May 19, 2020 2:10 amI have read your example serval times and attempted to run it. Unfortunately I do not have the skills (yet) to understand. The best I could do was make my example as you see it. Could I trouble you to alter the example so I (and other new coders) can better understand what you want to explain.isobellesophia wrote: ↑Tue May 19, 2020 12:40 am Read the example of my post above carefully, this one would appear if the words aren't listed in the codes.
Code: Select all
define user_input=[]
label start:
"Welcome!"
label user:
$ user_input = renpy.input(prompt = "Type anything you want!", allow="1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ /.,'?!")
$ user_input=user_input.lower().strip()
if user_input == "": #This will happen if there's no input.
"You didn't say anything. You must be the strong siolent type."
jump user
if user_input in ['hello','Hello','hi','Hi','howdy','Howdy','yo','Yo']:
"Hi. Do you want to ask me anything?"
jump user
elif user_input in ['cow','cows','Cows','Cow','milk','Milk']:
"That is not my cow."
jump user
elif user_input in ['sword of power','Sword of Power']:
"What!?!?!??!"
jump other
label sword: ####< Dont put this, because you already had a label above. Or, you can just create a new .rpy file instead, for several labels you want to create.
Code: Select all
label untype:
$ randdiag = renpy.random.randint(1, 10)
show m think with dissolve
if randdiag == 1:
a "Hello! Put the "label untype" below on your typed codes above, and NEVER PLACE THIS SOMEWHERE IN THE CODE. Or else it will break the dialogues.
jump user
elif randdiag == 2:
a "Wywisjdow is not a word!"
jump user