Music won't play after loading
Posted: Fri Nov 26, 2021 12:26 am
Hey there!
So my issue is, the following:
You play (music_1 is playing), you reach a choice menu (music_3 starts to play), you make a choice, keep on playing and reach a scene, where music_ 1 starts to play again. Works perfectly, except... if I load a save file that was made BEFORE the choice menu, where music_3 starts, when I reach the choice menu, it won't play.
Now I tried having music_3 start before the choice menu, but it's the same result. If the save file is from BEFORE music_ starts, it won't play when you reach it. There are other music changes that work fine when loaded, except this one.
And with this one, just like with the the rest, the music that's supposed to play is defined right there.
So since this description is somewhat vague, here is my question. What could cause this:
$ renpy.music.play("audio/music_3.mp3", channel='music3', loop=True, fadeout=2, synchro_start=True, fadein=2, tight=None, if_changed=False)
$ renpy.music.set_volume(0.55, 4, channel = "music3")
$ renpy.music.set_volume(0, 4, channel = "music")
to not work, if after a load you reach it in the script? But again, if you play a clean play-through, it works fine.
It's odd that it's possible for the game to reach the code above after loading a save, and just ignore it for some reason.
(Also tried if music_3 is on a channel that hasn't even been used before, like "music5"... same result.)
Thank you for any possible suggestions/ideas.
So my issue is, the following:
You play (music_1 is playing), you reach a choice menu (music_3 starts to play), you make a choice, keep on playing and reach a scene, where music_ 1 starts to play again. Works perfectly, except... if I load a save file that was made BEFORE the choice menu, where music_3 starts, when I reach the choice menu, it won't play.
Now I tried having music_3 start before the choice menu, but it's the same result. If the save file is from BEFORE music_ starts, it won't play when you reach it. There are other music changes that work fine when loaded, except this one.
And with this one, just like with the the rest, the music that's supposed to play is defined right there.
So since this description is somewhat vague, here is my question. What could cause this:
$ renpy.music.play("audio/music_3.mp3", channel='music3', loop=True, fadeout=2, synchro_start=True, fadein=2, tight=None, if_changed=False)
$ renpy.music.set_volume(0.55, 4, channel = "music3")
$ renpy.music.set_volume(0, 4, channel = "music")
to not work, if after a load you reach it in the script? But again, if you play a clean play-through, it works fine.
It's odd that it's possible for the game to reach the code above after loading a save, and just ignore it for some reason.
(Also tried if music_3 is on a channel that hasn't even been used before, like "music5"... same result.)
Thank you for any possible suggestions/ideas.