#==========================================================================
# ** Random Battle-BGM 1.01
#==========================================================================
# by ERZENGEL (www.rpgvx.de.ms)
#==========================================================================
#==========================================================================
# * Game_Map
#==========================================================================
class Game_Map
attr_accessor :rbm
attr_accessor :rbmusic
alias erzengel_rbminitialize initialize
def initialize
# The names of the audiofiles (they must be in the BGM-folder!)
@rbmusic = ["Battle1", "Battle2", "Battle3","Battle4"]
# TRUE if script should be active / FALSE if script should be inactive
@rbm = true
erzengel_rbminitialize
end
end
#==========================================================================
# * Scene_Map
#==========================================================================
class Scene_Map
alias erzengel_rbmcallbattle call_battle
def call_battle
rbm = $data_system.battle_bgm.name.clone
if $game_map.rbm == true
rndmusic = rand($game_map.rbmusic.size)
$data_system.battle_bgm.name = $game_map.rbmusic[rndmusic]
end
erzengel_rbmcallbattle
$data_system.battle_bgm.name = rbm.clone
end
end