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.
How do I make a decision take you back to the same list? I want it so that you can keep choosing to stand in place like an goofball. The decision below would be "Continue standing".
Any help would be greatly appreciated.
menu first_choice:
mrn "(So...what should I do now?)"
"Take a seat near Kyle.":
k "“Hee hee, you smell funny, Mr.Nobody!”"
r "“Kyle.”"
k "“O-oh...s-sorry, daddy.”"
narrator "Kyle seems pleased, but his dad looks like he's ready to kill us both. For real."
p "“As I was saying...”"
narrator "The service continued for a solid hour. That's all you get for being a cop."
"Take the seat closest to you.":
narrator "I must smell terrible, because the man next to me looks like he's ready to puke."
narrator "Kyle also looks a little disappointed, but it would come on as kind of creepy of me to sit next to him, anyway."
nvl clear
"Continue standing.":
mrn "(The audience is continuing to stare my way menacingly.)"
p "“Is something wrong, Mr.Nobody?”"
jump menu first_choice
Last edited by Teluna on Wed Apr 22, 2009 7:44 pm, edited 1 time in total.
label first_choice:
menu:
mrn "(So...what should I do now?)"
"Take a seat near Kyle.":
k "“Hee hee, you smell funny, Mr.Nobody!”"
r "“Kyle.”"
k "“O-oh...s-sorry, daddy.”"
narrator "Kyle seems pleased, but his dad looks like he's ready to kill us both. For real."
p "“As I was saying...”"
narrator "The service continued for a solid hour. That's all you get for being a cop."
"Take the seat closest to you.":
narrator "I must smell terrible, because the man next to me looks like he's ready to puke."
narrator "Kyle also looks a little disappointed, but it would come on as kind of creepy of me to sit next to him, anyway."
nvl clear
"Continue standing.":
mrn "(The audience is continuing to stare my way menacingly.)"
p "“Is something wrong, Mr.Nobody?”"
jump first_choice
If you were doing what I think you were trying to do, try putting in a label: before the menu, and then jump to that label.
You can't name a menu and then jump to it; that doesn't work. You can only jump to a "label:"
label first_choice:
menu:
mrn "(So...what should I do now?)"
"Take a seat near Kyle.":
k "“Hee hee, you smell funny, Mr.Nobody!”"
r "“Kyle.”"
k "“O-oh...s-sorry, daddy.”"
narrator "Kyle seems pleased, but his dad looks like he's ready to kill us both. For real."
nvl clear
p "“As I was saying...”"
narrator "The service continued for a solid hour. That's all you get for being a cop."
nvl clear
pass
"Take the seat closest to you.":
narrator "I must smell terrible, because the man next to me looks like he's ready to puke."
narrator "Kyle also looks a little disappointed, but it would come on as kind of creepy of me to sit next to him, anyway."
nvl clear
pass
"Continue standing.":
mrn "(The audience is continuing to stare my way menacingly.)"
p "“Is something wrong, Mr.Nobody?”"
jump label first_choice:
menu:
"You see a cup of coffee on the table."
"Take the cup of coffee":
"You take the cup of coffe and drink it."
"The taste is really good, somewhat bitter than what you're used too, but that fullfils you need of cafeine for the time being."
"Bear that, I need to stop drinking so much coffee.":
pass
# now we're out of the menu
"Someone calls you from the living room..."
It's still a no go, KD. Now it's giving me troubles with the jump command again. It seems as though I can't have one without the other. I'll post the error.txt and stuff, but I don't know how much that's going to help.
On the plus side, I think I have it indented properly this time. Let me know so I can continue to correct any unnecessary errors.
label first_choice:
menu:
mrn "(So...what should I do now?)"
"Take a seat near Kyle.":
k "“Hee hee, you smell funny, Mr.Nobody!”"
r "“Kyle.”"
k "“O-oh...s-sorry, daddy.”"
narrator "Kyle seems pleased, but his dad looks like he's ready to kill us both. For real."
nvl clear
p "“As I was saying...”"
narrator "The service continued for a solid hour. That's all you get for being a cop."
nvl clear
"Take the seat closest to you.":
narrator "I must smell terrible, because the man next to me looks like he's ready to puke."
narrator "Kyle also looks a little disappointed, but it would come on as kind of creepy of me to sit next to him, anyway."
nvl clear
"Continue standing.":
mrn "(The audience is continuing to stare my way menacingly.)"
p "“Is something wrong, Mr.Nobody?”"
jump first_choice:
The error is, "jump first_choice" doesn't have a ":" after it. The ":" is usually used to start a new block in python, and it's just accepted in block commands (it's not the case of jump, that is a in-line command)
You shouldn't have the colon on the end of the line with a 'jump'. Just "jump first_choice".
The colon says "a block of code is dependent on this line and follows immediately afterward". So there's a colon on a label statement, because there's a block of code that sits 'inside' that label; there's a colon on an if, because there's a block of code which only gets executed if the 'if' condition is true; there's a colon on a menu choice, because there's a block of code which only gets executed when that menu choice is selected... but the jump executes fine on its own, it doesn't need a block of code because that's found at the label you're jumping to, so you don't need the colon.