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.
I am trying to write a choice menu, simple yes/no. But I want the results of the choice to happen a bit later in my novel. I want to have one scene play out if you say yes and a different branch open up if you say no.
So far it looks something like this:
menu:
"Should I surprise him?"
"yes":
$ surprise_yes = True
"blah, blah."
"no":
"blazzity, blah."
Label d1_surprise:
p "random chat"
c "random chat"
if surprise_yes:
p "random chat"
i "blah, blah."
p "random chat"
else:
i "blah, blah."
p "random chat"
label d1_continue:
I get an error:
File "renpy/common/00start.rpy", line 120, in script
return
Exception: Could not find return label (u'game/script.rpy', 1548214453, 16).
How do I write it to properly show the scene later on?
default surprise_yes = False
label start():
"The game is starting, how surprising."
menu:
"Should I surprise him?"
"yes":
$ surprise_yes = True
"blah, blah."
"no":
"blazzity, blah."
label d1_surprise():
p "random chat"
c "random chat"
if surprise_yes:
p "random chat"
i "blah, blah."
p "random chat"
else:
i "blah, blah."
p "random chat"
label d1_continue():
"Blah blah"
return
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)