I was unhappy with the Fade BGM event, so I tried to write my own function in Game_Interpreter for it.
It works perfectly fine, but the only issue is that so far, I'm only aware of using the "wait" command to make the fade effect work, and this has the effect of also freezing the entire game as it does its thing. I wanted to ask if there's anything similar to it I could use that lets the function continue without freezing the game.
Ruby:
def audifade(name, duration, pitched = false, pitch = 100)
counting = 100
for c in 1..100 do
volnew = counting * $game_options.master_volume # <- using vlue's basic options
volnew *= $game_options.bgm_volume # <- using vlue's basic options
Audio.bgm_play('Audio/BGM/' + name, volnew, pitch, 1)
p c
counting -= 1
wait( duration / 100 )
end
Audio.bgm_stop
end
It works perfectly fine, but the only issue is that so far, I'm only aware of using the "wait" command to make the fade effect work, and this has the effect of also freezing the entire game as it does its thing. I wanted to ask if there's anything similar to it I could use that lets the function continue without freezing the game.