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.
-
DFlimbingo
- Newbie
- Posts: 24
- Joined: Wed Mar 24, 2021 2:37 am
-
Contact:
#1
Post
by DFlimbingo » Wed Dec 15, 2021 6:52 am
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?
-
Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
-
Contact:
#2
Post
by Ocelot » 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?
< < insert Rick Cook quote here > >
-
DFlimbingo
- Newbie
- Posts: 24
- Joined: Wed Mar 24, 2021 2:37 am
-
Contact:
#3
Post
by DFlimbingo » Wed Dec 15, 2021 4:57 pm
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?
Users browsing this forum: Google [Bot]