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.
## Used when returning to the main menu from the game.
config.game_main_transition = dissolve
...I was wondering if there's something like that but reverse?
So, a code that is used to play a transition when you hit the Start Game button and enter the game?
Thanks in advance!
init -2 python:
class Start(Action, DictEquality):
"""
:doc: menu_action
Causes Ren'Py to jump out of the menu context to the named
label. The main use of this is to start a new game from the
main menu. Common uses are:
* Start() - Start at the start label.
* Start("foo") - Start at the "foo" label.
"""
def __init__(self, label="start"):
self.label = label
def __call__(self):
renpy.transition(start_transition)
renpy.jump_out_of_context(self.label)
Just add "renpy.transition(start_transition)" before jumping to the start label were "start_transition" is a variable containing the actual transition.
You also need to add a pause for the same length as the transition to the beginning of your start label or the text will begin showing before the transition finishes.