renpy.image - Ren'Py

documentation index ◦ reference manual ◦ function index

# renpy.image

Function: | renpy.image | (name, img):

This is used to execute the image statment. It takes as arguments an image name and an image object, and associates the image name with the image object.

Like the image statment, this function should only be executed in init blocks.

name - The image name, a tuple of strings.

img - The displayable that is associated with that name. If this is a string or tuple, it is interpreted as an argument to Image.

## Example

    init:
        python:
            for character in ['eileen', 'alice', 'lucy']:
                for expression in ['happy', 'concerned', 'vhappy']:
                    # image files are named as eileen_happy.png, etc.
                    renpy.image((character, expression),
                                "%s_%s.png" % (character, expression))

    show eileen happy
    "I find myself strangely happy to see Eileen in this example."

documentation index ◦ reference manual ◦ function index