Page 1 of 1
Transition from Main Menu to entering the Game?
Posted: Sun Jul 08, 2018 10:03 pm
by shyuser
Sorry if this is a noobish question, but since there's...
Code: Select all
## 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!
Re: Transition from Main Menu to entering the Game?
Posted: Mon Jul 09, 2018 12:15 am
by Imperf3kt
Not too sure, to be honest.
Personally, I did this in one of my projects, but I achieved it through ATL.
If you don't mind a slightly hacky way of doing things, I'll send you over an example once I find the right folder.
Re: Transition from Main Menu to entering the Game?
Posted: Mon Jul 09, 2018 6:04 am
by MaydohMaydoh
I just added a transition directly to the Start function.
Code: Select all
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.