renpy.scene - Ren'Py

documentation index ◦ reference manual ◦ function index

# renpy.scene

Function: | renpy.scene | (layer='master'):

This clears out the specified layer, or 'master' by default. This is used in the execution of the `scene` statement, but only to clear out the layer. If you want to then add something new, like the `scene` statement would normally do when an image parameter is given, call renpy.show after this.

## Example

    init:
        python:
            for slideindex in range(10):
                # images are named slide0.png...slide9.png
                renpy.image('slide%d' % slideindex,
                            'slide%d.png' % slideindex)

    "And now, a slideshow"
    python:
        for slideindex in range(10):
            # clear all images
            renpy.scene()

            renpy.show('slide%d' % slideindex)

            # set the transition for the pause interaction
            renpy.transition(dissolve)

            renpy.pause(3.0)

    scene bg washington
    "Wasn't that nice?"

documentation index ◦ reference manual ◦ function index