documentation index

Contents

Adding Music & Sound Effects

Music

To play background music (which loops until you stop it), you use the play statement:

play music "ominous.ogg"

To use fade-in or fade-out (in seconds):

play music "ominous.ogg" fadein=2 fadeout=2

To stop the background music, you use stop statement:

stop music

Sound Effects

To play a sound effect, use the play statement:

play sound "bang.ogg"

There's a Ren'Py function to stop sound, but there's usually no reason to use it.

Voices (Voice Acting)

If you want to add voice acting to your visual novel, you'll need to put each screen of dialog into a separate file, and name them in a way that you can figure out which line of dialog they go with. Then, before each line of dialog, put a voice statement:

voice "bob203.ogg"

bob "I love ice cream."

voice "nancy218.ogg"

nancy "I love ice cream too."

voice "bob204.ogg"

bob "I also like cookies."


Previous:
Branching & Recombining the Story
Ren'Py Web Tutorial Next:
(none)

documentation index