[SOLVED]Sound Effect When Dialog Advances?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Braydxne
Regular
Posts: 50
Joined: Tue Aug 08, 2017 4:03 am
Projects: DR: Chains of Trust
Contact:

[SOLVED]Sound Effect When Dialog Advances?

#1 Post by Braydxne »

What I want to do is have a simple sound effect play each time the dialog is advanced. (The player clicks/presses space and a little 'blip' is heard. Like in Danganronpa. (and im sure many other vns)It seems pretty simple to explain but it seems no one else has asked about it. (I'm aware I could just use play sound after each line of dialog but that seems rather tedious and i'm sure there has to be a better solution.)
Last edited by Braydxne on Wed Sep 20, 2017 8:28 pm, edited 1 time in total.

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Sound Effect When Dialog Advances?

#2 Post by Divona »

Code: Select all

init python:
    def dismiss_callback():
        renpy.play("sound.ogg")
        return True

    config.say_allow_dismiss = dismiss_callback
Completed:
Image

User avatar
Braydxne
Regular
Posts: 50
Joined: Tue Aug 08, 2017 4:03 am
Projects: DR: Chains of Trust
Contact:

Re: Sound Effect When Dialog Advances?

#3 Post by Braydxne »

Thank you so much, you're amazing!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]