Transition from Main Menu to entering the Game?

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.
Post Reply
Message
Author
shyuser
Newbie
Posts: 1
Joined: Sun Jul 08, 2018 9:47 pm
Contact:

Transition from Main Menu to entering the Game?

#1 Post 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! :)

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3791
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Transition from Main Menu to entering the Game?

#2 Post 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.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
MaydohMaydoh
Regular
Posts: 165
Joined: Mon Jul 09, 2018 5:49 am
Projects: Fuwa Fuwa Panic
Tumblr: maydohmaydoh
Location: The Satellite of Love
Contact:

Re: Transition from Main Menu to entering the Game?

#3 Post 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.

Post Reply

Who is online

Users browsing this forum: No registered users