Sound effect when character is talking?
Posted: Tue Mar 22, 2022 11:29 am
I'm trying to create a typerwriter-like effect for when a character is talking. I've searched far and low on reddit, this forum, youtube, etc. and I still can't seem to get it to work. I get no error code, I've tried to tweak the code in various ways and still no result. So finally I've decided to just ask on here!
I've also applied each effect to different characters
If anyone has a clue what's going on that'd be grand!
Code: Select all
init python:
def low_beep(event, interact=True, **kwargs):
if not interact:
return
if event == "show":
renpy.sound.play("game/audio/Dialogue3_loop.mp3", channel="sound", loop=True)
elif event == "slow_done" or event == "end":
renpy.sound.stop(channel="beeps")
def mid_beep(event, interact=True, **kwargs):
if not interact:
return
if event == "show":
renpy.sound.play("game/audio/Dialogue1_loop.mp3", channel="sound", loop=True)
elif event == "slow_done" or event == "end":
renpy.sound.stop(channel="sound")
def high_beep(event, interact=True, **kwargs):
if not interact:
return
if event == "show":
renpy.sound.play("game/audio/Dialogue2_loop.mp3", channel="sound", loop=True)
elif event == "slow_done" or event == "end":
renpy.sound.stop(channel="sound")
Code: Select all
init:
$ mc = Character("[name]", callback=mid_beep)
$ narrator = Character(None, callback=low_beep)