- May 5, 2021
- 97
- 172
I'm using a sound loop to add some ambiance into my game.
At start the sound is rather loud, but it's what I want. But after a few pictures, I would like to decrease the volume without breaking the loop.
Is there a way to change a channel's volume progressively ? Or of an ongoing track (ideally progressively as well) ?
What I am doing now is that I stop the loop with a fadeout, and replay it with a lower volume and a fadein. It kind of works because the loop is very repetitive, but it's not great.
At start the sound is rather loud, but it's what I want. But after a few pictures, I would like to decrease the volume without breaking the loop.
Is there a way to change a channel's volume progressively ? Or of an ongoing track (ideally progressively as well) ?
What I am doing now is that I stop the loop with a fadeout, and replay it with a lower volume and a fadein. It kind of works because the loop is very repetitive, but it's not great.
Code:
stop sound fadeout 0.5
queue sound "audio/Sound.mp3" fadein 0.5 loop volume 0.5
Last edited: