Page 1 of 1

Character callback 'show_done' overrides 'show'

Posted: Wed Dec 15, 2021 6:52 am
by DFlimbingo
Hey, I'm using the beepy sound code for expanded text bleeps. my main issue right now is that I want a sound to start at the end of a part of dialogue, but it doesn't seem to work. This is how I set it up:

Code: Select all

def johnnyc_callback(name, event, **kwargs):
        global speaking

        if event == "show":
            speaking = name
            renpy.music.play("johnnytalk2.wav", channel="sound", loop=True)
        elif event == "show_done":
            speaking = name
            renpy.music.play("johnnytalkfin.wav", channel="sound", loop=False)
        elif event == "slow_done":
            speaking = None
            renpy.music.stop(channel="sound")
        elif event == "end":
            speaking = None
            renpy.music.stop(channel="sound")
           
I expected 'show_done' to activate after 'show', however, all this seems to do is override the 'show' event, so only the 'show_done' beep activates. Any ideas on how I can fix this?

Re: Character callback 'show_done' overrides 'show'

Posted: Wed Dec 15, 2021 10:55 am
by Ocelot
show and show_done are fired consequently, before and after displaying text (not after text animation stops, text animation itself starts only after text displayable is shown). Usually it happens in the same fraction of the second. You would unlikely to be able to notice moment between those events.

What exactly are you trying to accomplish?

Re: Character callback 'show_done' overrides 'show'

Posted: Wed Dec 15, 2021 4:57 pm
by DFlimbingo
Ocelot wrote:
Wed Dec 15, 2021 10:55 am
show and show_done are fired consequently, before and after displaying text (not after text animation stops, text animation itself starts only after text displayable is shown). Usually it happens in the same fraction of the second. You would unlikely to be able to notice moment between those events.

What exactly are you trying to accomplish?
Okay, thank you for explaining! What I was trying to do is have the sound in show continue throughout the dialogue on a loop, and when the dialogue ends, show_done activates to signal the end of the dialogue with a single, non-looping beep. So essentially, I want a looping sound to continue throughout the dialogue and end with a specific single beep sound, however I can do it. Is there a better way for me to do this?