Call load screen after bad ending
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.
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.
Call load screen after bad ending
I would like to call the load game screen within the text, after a bad ending. I need the user to be unable to press the Return and Save Game buttons as well as advance further in the script, as when using the load screen from the main menu. Using call screen load isn't enough as it still allows the user to continue.
Re: Call load screen after bad ending
a simple and ugly solution comes to mind
so if user press "return" it simply returns him back to the screen.
if you insist user to be unable to return and savegame maybe modifying screens will help.
the code for it is more complicated (and even more ugly for sure)
go to screens.rpy and find "screen navigation" change to following
then find "screen load" change to following
then when you reach your bad end just
Code: Select all
#bad ending script here
label infinite_loop:
call screen load
jump infinite_loop
if you insist user to be unable to return and savegame maybe modifying screens will help.
the code for it is more complicated (and even more ugly for sure)
go to screens.rpy and find "screen navigation" change to following
Code: Select all
screen navigation(bad_end=False):
# The background of the game menu.
window:
style "gm_root"
# The various buttons.
frame:
style_group "gm_nav"
xalign .98
yalign .98
has vbox
if not bad_end:
textbutton _("Return") action Return()
textbutton _("Preferences") action ShowMenu("preferences")
if not bad_end:
textbutton _("Save Game") action ShowMenu("save")
textbutton _("Load Game") action ShowMenu("load")
textbutton _("Main Menu") action MainMenu()
textbutton _("Help") action Help()
textbutton _("Quit") action Quit()
Code: Select all
screen load(badend=False):
# This ensures that any other menu screen is replaced.
tag menu
use navigation(bad_end=badend)
use file_picker
Code: Select all
call screen load(badend=True)
#instead of "call screen load"
Look! It's moving. It's alive. It's alive... IT'S ALIVE! Oh, in the name of God! Now I know what it feels like to be God!(@Henry_Frankenstein. Sums up my coding style)
Who is online
Users browsing this forum: Google [Bot]