dialouge transition sound effects?
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.
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.
-
battlecomics700
- Newbie
- Posts: 6
- Joined: Sat Jun 20, 2020 3:54 pm
- itch: battlecomics700
- Contact:
dialouge transition sound effects?
i wanted there to be a sound whenever i click and go to a new piece of dialogue in my game. does anyone know of a way to do this?
- 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:
Re: dialouge transition sound effects?
Have you ever tried using "play" perchance?
Code: Select all
label start:
"A dialogue"
pause 2.0
scene school
play sound "sounds/bell.ogg" fadein 1.0
"A new dialogue here blah blah"
return- Donmai
- Eileen-Class Veteran
- Posts: 1919
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: dialouge transition sound effects?
Someone may have a better solution, but here's my answer, anyway.
In "The One in LOVE" we can hear a computer sound every time the character Lady Lovelace talks. That's because Lady Lovelace is in fact a computer. To achieve that effect I used a python routine and the character callback statement. Here's how I did it:
The routine that plays the sound:
To play the sound every time that character talks, simply add a callback statement to the character definition:
In "The One in LOVE" we can hear a computer sound every time the character Lady Lovelace talks. That's because Lady Lovelace is in fact a computer. To achieve that effect I used a python routine and the character callback statement. Here's how I did it:
The routine that plays the sound:
Code: Select all
init:
python:
def lady_voice(event, interact=True, **kwargs): # lady_voice is the name I gave to the event. You can give it any other name
if not interact:
return
if event == "show_done":
renpy.sound.play("sfx/computer.OGG") # the sound computer.OGG is inside a subfolder named sfxCode: Select all
define lady = Character('Lady Lovelace', callback = lady_voice)No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]



