How to play sound while reading dialogue

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
isobellesophia
Miko-Class Veteran
Posts: 979
Joined: Mon Jan 07, 2019 2:55 am
Completed: None
Projects: Maddox and Friends! (AI Teacher friend), Friendly Universities! (Soon)
Organization: Friendly Teachers series
Deviantart: SophBelle
itch: Child Creation
Location: Philippines, Mindanao
Contact:

How to play sound while reading dialogue

#1 Post by isobellesophia »

Hi,

I need help for how am i supposed to do while the one dialogue is running, then a sound will play.
(Just like footsteps.)

So, any help?

Thanks.
I am a friendly user, please respect and have a good day.


Image

Image


User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

Re: How to play sound while reading dialogue

#2 Post by ComputerArt.Club »

you pretty much said it.
play sound “filename.mp3”
:)

I usually use .ogg files, cant remember why (perhaps I had issues with other file types. I recommend checking the documentation.
It lists the compatible file types and other useful commands (e.g. consider using queue instead of play if you have a lot and you dont want them to interrupt eachother
https://www.renpy.org/doc/html/audio.html

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot]