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.
Hello again. I have this little issue where every time I click back to the main menu or finish playing the game, instead of just showing me the menu the game goes to the intro I have (a warning screen and a screen where you can input your name. I will be also adding a logo and an intro so those would also probably play...)
This is kind of annoying so is there a way to make it not loop from the very beginning?
label before_main_menu:
n"The game includes violence, crude language, gore and sexual content, and is not recommended for those
under the age of 16 or for the weak-minded. By clicking 'NEXT' you understand this and proceed with caution."
show popup
$ player_name = renpy.input("")
$ player_name = player_name.strip()
$ you.name = player_name.capitalize()
if player_name == "":
$ player_name="MC"
hide popup with fade
#play intro here
label main_menu:
call screen main_menu
label restart:
call screen confirm (message = u "Restart?", yes_action = Start(), no_action = Jump("main_menu"))
label start:
#variables
#(...)
#-------
#code intro
label splashscreen:
#(...)
#-----------
label start:
# More code here....
#------------
label final:
"This is the end. Goodbye."
# Reset splashscreen label game
$ renpy.full_restart(transition=False, label='splashscreen', target='_splashscreen') #<----this line
I tried this function.
I hope it works for you.
I speak and write in Spanish. I use an English-Spanish translator to express myself in this forum. If I make any mistakes, please forgive me.
I try my best to give an answer according to your question.
Calling things like that isn't advised, I suspect it's the cause of your issue (you must "return" from a call, unlike a jump). The main menu isn't a regular screen either, it exists in a different context, so calling it like that will not fix your issue, rather it will compound it.
If you just want to brute force your way back to the main menu, add this to the end of your script (in place of a final "return")
I speak and write in Spanish. I use an English-Spanish translator to express myself in this forum. If I make any mistakes, please forgive me.
I try my best to give an answer according to your question.