This page is out of date

You've reached a page on the Ren'Py wiki. Due to massive spam, the wiki hasn't been updated in over 5 years, and much of the information here is very out of date. We've kept it because some of it is of historic interest, but all the information relevant to modern versions of Ren'Py has been moved elsewhere.

Some places to look are:

Please do not create new links to this page.


Tips menu

With this script you are able to create new menu with buttons to jump in different part of game script.

Example

# Jump to this label from the main menu with Start("tips")
label tips:
    call screen tips

init python:
    # Styles for the tips screen
    style.tips_button.xminimum = 400

# Tips screen
screen tips:
    # Show the tips background.
    add "bg tips_background"

    # Show the tips menu in the middle of the screen.
    vbox:
        style_group "tips"
        xalign 0.5
        yalign 0.5

        # These are simple textbuttons with an associated action;
        # the If() disables the buttons unless some persistent
        # variable is set.
        textbutton "Tip #1" action If(persistent.unlock_tip_1, Jump("tip_1"))
        textbutton "Tip #2" action If(persistent.unlock_tip_2, Jump("tip_2"))
        # etc. for as many tips as you want.
        textbutton "Stop viewing TIPS." action Jump("end_tips") 

label end_tips:
    return

label tip_1:
    "Perhaps you should have checked to see if that was a carton of oatmeal,
     or a carton of rat poison."

    jump tips

label tip_2:
    "She's a TRAP!"

    jump tips

To unlock the first tip in this example, you would write the following in your game script at the point you want the tip to be unlocked:

    $ persistent.unlock_tip_1 = True

For information about the screen language constructs used here, see http://www.renpy.org/doc/html/screens.html and http://www.renpy.org/doc/html/screen_actions.html .