Sound during Transition?

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
Alphonse
Regular
Posts: 105
Joined: Tue Aug 26, 2008 7:32 pm
Contact:

Sound during Transition?

#1 Post by Alphonse »

Is it possible to have a sound effect be -a part- of a custom transition? Now, I tried putting the sound the trans. before, and after the trans., and it sounds late/random... I'd like to have it DURING the transition (which, if you're curious, I'm using the Flash one in the Cookbook), so is there a way to do that? Maybe there's something I overlooked, I'm not that familiar with Ren'Py.

Thanks!

monele
Lemma-Class Veteran
Posts: 4101
Joined: Sat Oct 08, 2005 7:57 am
Location: France
Contact:

Re: Sound during Transition?

#2 Post by monele »

Strange. Playing the sound just before the transition should work :

Code: Select all

$ renpy.play("somesound.wav")
scene bg market
show marie
with flash
This should start playing the sound and immediately start the transition. If the sound is constantly late (try rolling back and going through the transition again multiple times and see if it always plays with the same delay), it means you should edit the sound and remove possible silence at its beginning.
If the delay is variable, though, it might be a Ren'Py issue which I can't remember wether it was solved or not at some point (I think it was but...)

Alphonse
Regular
Posts: 105
Joined: Tue Aug 26, 2008 7:32 pm
Contact:

Re: Sound during Transition?

#3 Post by Alphonse »

Oh! That works! Thank you!

Maybe it was because I was using that "play sound" thing...is there a difference, or is it pretty much different in name only?

Regardless, thank you for that!

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Sound during Transition?

#4 Post by PyTom »

There shouldn't be any difference between play sound and renpy.sound.play. They're different ways of accomplishing the same thing, with the former preferred.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Google [Bot]