Code: Select all
init -1 python:
def thunder_sound(trans, st, at):
renpy.play("audio/sound/thunder.mp3", channel="sound")
image lightning:
choice: #weight of choice is 1
"lightning.png"
alpha 0.0
function thunder_sound
0.5 # show nothing for 0.5 seconds
choice 0.1: #weight of choice is 0.1
"lightning.png"
alpha 0.0
function thunder_sound
linear 0.3 alpha 1.0
linear 0.3 alpha 0.0
choice 0.1:
"rev_lightning"
alpha 0.0
function thunder_sound
linear 0.3 alpha 1.0
linear 0.3 alpha 0.0
And I say technically, cause the sound plays for maybe half a second and then just stops. I assume something in that code forces the sound to stop the second that the animation is done? Which obviously I don't want, I want the thunder sound to play fully. And just to clarify: it's NOT that the sound stops because the next lightning happens. It just cuts off instantly, even when the next flash is 12 seconds away.
The only mention of "force play" for sound that I could find was this Reddit thread which suggests to queue sounds. But using the above function with queue gives me errors.
Anyone got any idea on what to do?