Ren'Py How can I add a choice to the splashscreen ?

Seanthiar

Active Member
Jun 18, 2020
552
736
HI,

I've made a splashscreen in Ren'py for a disclaimer "If you are over 18......" and I want two buttons Quit and Continue on the splashscreen. Quit closes the program and continue moves forward to the start menu. I tried different methods (menu, textbuttons, etc.) and everything I made worked fine in a generic block (label xyz .... return) but if I renamed the label or moved the code to splashscreen the game crashed.
Anyone an idea how to get the two choices clickable on a splashscreen ?

Seanthiar
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
I personally would use a using rather than a simple . But the overall solution is still more or less the same...

Python:
label splashscreen:

    scene black with fade

    menu:
        "Are you of legal age within your jurisdiction?"
        "Yes":
            pass

        "No":
            $ renpy.quit()

    return

label start:

    # blah, blah, more code.

Obviously, you'll want to pretty things up a lot more than this basic example.

If you do end up using a , then you'll want to use instead of .

pass is RenPy for "do nothing". You could code the return statement there instead - but for various reasons, I prefer to do it this way. Some people confuse pass as a sort of "carry on" statement - which it sort of is... but generally you'd only use it when no other statement makes sense within a menu: or if: statement.
 
Last edited: