Does anyone know how to make music and/or sounds fade out? I would think there would be a line that would involve the channel and decrease the volume by x amount per second/100th of a second etc.....but i cant figure it out lol.
Printable View
Does anyone know how to make music and/or sounds fade out? I would think there would be a line that would involve the channel and decrease the volume by x amount per second/100th of a second etc.....but i cant figure it out lol.
From one of Nivram's examples: distancevolumeexample.mfa
set volume to:
100-(Abs(Sqr((X( "Active" )-X( "Active 2" )) pow 2+(Y( "Active" )-Y( "Active 2" )) pow 2)))/3.5
This is increases or decreases volume depending proximity. Works well.
It is much easier if you use an extension like Onu, since it has built in functionality for fading in/out. But if you are using MMF's built in sound, then you can try setting the volume to a variable and just increase/decrease the variable by a set amount every frame until it reaches the desired volume. But this is more for global sound, not positional sound (like arfa's example).