Is it possible to fade to black before returning to main menu? [SOLVED]
Posted: Tue Sep 17, 2019 4:28 pm
So, I found a 13-year-old thread (this one: viewtopic.php?f=8&t=1179) where someone had asked how to do this, but the answer that was listed there, from 2006, seems no longer to apply, which of course makes sense that things could have changed so dramatically since then that not every answer from such an old thread would still be relevant.
I asked in that thread if there was any updated way to get this to work, but the resurrected thread seems to have gone completely un-noticed and has fallen off the most recent threads list pretty quickly; it probably wouldn't have gotten much attention because the title was very ambiguous (just 'Ren'Py Questions') and the date was so, so old.
So I figured I would copy-paste my post from that thread and re-ask in a new thread with a better title. I hope that's ok, I'm still learning the forum rules and etiquette here, and I certainly don't want to be annoying!
So when I try this:
...it results in the below exception, I'm assuming because _library_main_menu is no longer what the main menu screen is referred to as.
And when I try this:
...nothing happens, the game just immediately cuts to the main menu.
These code samples do the exact same as using return (meaning, nothing different happens at all, the game does return to the main menu but without any sort of transition):
I used pixellate as the transition in the above tests because I wanted something really obvious so I could see if I was getting a result or not, even though my ultimate goal is to use a simple fade.
I've been able to at least fade away to black by trying this:
But once it has faded to black, the main menu of course instantly appears, without any transition, so it's better than nothing but still not ideal.
Is there any way currently to set a transition when you return to the main menu?
I asked in that thread if there was any updated way to get this to work, but the resurrected thread seems to have gone completely un-noticed and has fallen off the most recent threads list pretty quickly; it probably wouldn't have gotten much attention because the title was very ambiguous (just 'Ren'Py Questions') and the date was so, so old.
So I figured I would copy-paste my post from that thread and re-ask in a new thread with a better title. I hope that's ok, I'm still learning the forum rules and etiquette here, and I certainly don't want to be annoying!
So when I try this:
Code: Select all
label quitToMenu:
pause
$ quick_menu = False
with None
$ renpy.transition(pixellate)
jump _library_main_menu
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 198, in script
jump _library_main_menu
ScriptError: could not find label '_library_main_menu'.
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 198, in script
jump _library_main_menu
File "C:\Users\Derp\Desktop\renpy-7.3.2-sdk\renpy\ast.py", line 1695, in execute
rv = renpy.game.script.lookup(target)
File "C:\Users\Derp\Desktop\renpy-7.3.2-sdk\renpy\script.py", line 894, in lookup
raise ScriptError("could not find label '%s'." % str(original))
ScriptError: could not find label '_library_main_menu'.
Windows-8-6.2.9200
Ren'Py 7.3.2.320
Derp 0.07
Wed Sep 11 15:25:36 2019
Code: Select all
label quitToMenu:
pause
$ quick_menu = False
with None
$ renpy.transition(pixellate)
return
These code samples do the exact same as using return (meaning, nothing different happens at all, the game does return to the main menu but without any sort of transition):
Code: Select all
label quitToMenu:
pause
$ quick_menu = False
with None
$ renpy.transition(pixellate)
$ MainMenu(confirm=False)()
Code: Select all
label quitToMenu:
pause
$ quick_menu = False
with None
$ renpy.transition(pixellate)
$ renpy.full_restart()
I've been able to at least fade away to black by trying this:
Code: Select all
label quitToMenu:
pause
$ quick_menu = False
scene black
with fade
return
Is there any way currently to set a transition when you return to the main menu?