12-05-2012, 06:20 AM
You can decrease the volume of the track already playing too, there is no need to stop and re-start it. Besides that, if you use $game_system.<sound>_memorize or restore, it'll override whatever you've memorized via events.
Here's a sample of how you could do it...
@KasperKalamity: These volume systems are implemented for the player, not the developer. Let's say the player is listening to music (not the game's music), but they're having trouble playing it on mute with no sound effects. That player can go in the menu and turn off the BGM, leaving the sound effects on. Or maybe they really like your game's soundtrack but can't stand the little menu 'blip blips' and such, they can turn off the sounds and still enjoy the game's music.
Here's a sample of how you could do it...
Code:
bgm_flag = $game_system.playing_bgm.is_a?(RPG::AudioFile)
bgs_flag = $game_system.playing_bgs.is_a?(RPG::AudioFile)
$game_system.playing_bgm.volume = new_bgm_volume if bgm_flag
$game_system.playing_bgs.volume = new_bgs_volume if bgs_flag
@KasperKalamity: These volume systems are implemented for the player, not the developer. Let's say the player is listening to music (not the game's music), but they're having trouble playing it on mute with no sound effects. That player can go in the menu and turn off the BGM, leaving the sound effects on. Or maybe they really like your game's soundtrack but can't stand the little menu 'blip blips' and such, they can turn off the sounds and still enjoy the game's music.