Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
- Posts: 1
- Joined: Sun Jul 08, 2018 9:47 pm
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!
- Lemma-Class Veteran
- Posts: 2140
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
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.
- Posts: 101
- Joined: Mon Jul 09, 2018 5:49 am
- Projects: Fuwa Fuwa Panic
- Tumblr: maydohmaydoh
- Location: The Satellite of Love
I just added a transition directly to the Start function.
Code: Select all
init -2 python:
class Start(Action, DictEquality):
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
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.