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.
The secret (and by that, I mean it's poorly documented) to fading into the main menu is to use the renpy.transition() function. This function will cause a transition to occur during the next interaction, regardless of what causes that interaction. So if you do something like:
PyTom wrote:The secret (and by that, I mean it's poorly documented) to fading into the main menu is to use the renpy.transition() function. This function will cause a transition to occur during the next interaction, regardless of what causes that interaction. So if you do something like:
JumpOutException: start
The last script statement executed was on line 65 of common/mainmenu.rpy.
The traceback is nice and long and lovely, but it ends with something about ui.rpy having an exception with jumpsoutofcontext. I didn't want to tinker around with mainmenu.rpy and figure out what was causing it, so I decided to report it. (I'm on a Mac OS X 10.4.3 PPC G4, if it helps. Maybe it's just me...)
However, the same function can be used to do the same thing if it's called a the end of the splashscreen label:
...in the demo on my linux workstation, and it doesn't crash, although neither does it provide the intended fade-in effect when starting the game, only when jumping to the main menu from the game menu, or at the end of the game.
Mihel wrote:The traceback is nice and long and lovely, but it ends with something about ui.rpy having an exception with jumpsoutofcontext.
It's also chock-full of information that helps me debug the problem.
If you could send me the traceback, and perhaps a game script that demonstrates the problem, I'd appreciate it.
Re: dissolving in the menu, and why it isn't happening for shaja... I think it may be because it's the first screen of the game, and we've never set anything to dissolve from:
It stands to reason this 13 year old thread would have out-of-date information in it, but I can't get the most recent code example listed immediately above to work.
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