Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
"Hey Bobio." if saminfo == "name":
you"Hey Bobio!"
Bob"I see you've met Sam."
Bob"Well, it is a lot nicer than some of the other names I had been given when I was a kid."
$ bobinfo == "kids"
jump bobask
"Blah." if saminfo == "blah":
jump seesam
label seesam:
menu sammenu:
"So do you have a nickname for Bob?"
$ saminfo = "name"
you"So do you have a nickname for Bob?"
"What other nicknames did Bob have?" if saminfo == "blah": ### here is the only problem
you"What other nicknames did Bob have?"
It works fine up until it gets to saminfo == "blah", it won't show up, and I can't see why? Everything works perfect if I take away the that if statement but that kind of defeats the purpose?
You can change it infinite times. It should be working, maybe it's just an error in your code. I use a number for that kind of thing though. Also it's missing "jump sammenu' at the end of the first choice in the 2nd label.
Did you copy the script verbatim? Because you're missing a colon after the first menu item. You should be getting an error that tells you to put a colon there before the game will run.
label seesam:
menu sammenu:
"So do you have a nickname for Bob?":
$ saminfo = "name"
you"So do you have a nickname for Bob?"
If there is a colon, there shouldn't be any other reason the second menu item doesn't show up. Unless, of course, saminfo doesn't actually equal "blah"...