module LunaticGrace RANDOM_BATTLE_BGM_SWTCH = 1 # ID of Switch to turn on and off the # random battle music # list of battle music randomply played when switch is ON. BGM = ["001-Battle01", "002-Battle02", "003-Battle03", "004-Battle04"]endclass Scene_Map #-------------------------------------------------------------------------- # * Battle Call #-------------------------------------------------------------------------- def call_battle # Clear battle calling flag $game_temp.battle_calling = false # Clear menu calling flag $game_temp.menu_calling = false $game_temp.menu_beep = false # Make encounter count $game_player.make_encounter_count # Memorize map BGM and stop BGM $game_temp.map_bgm = $game_system.playing_bgm $game_system.bgm_stop # Play battle start SE $game_system.se_play($data_system.battle_start_se) # Play battle BGM if $game_switches[LunaticGrace::RANDOM_BATTLE_BGM_SWTCH] music = LunaticGrace::BGM[rand(LunaticGrace::BGM.size)] Audio.bgm_play("Audio/BGM/" + music, 100, 100) else $game_system.bgm_play($game_system.battle_bgm) end # Straighten player position $game_player.straighten # Switch to battle screen $scene = Scene_Battle.new end end
Wow, thanks, I never thought I get a fast script.
But I get a few problem :
I tried using your script, but somehow it only stuck in 1 music and the music battle keep going after the battle ended.
And I also tried to select [none] in battle BGM (in the system menu) and it still doesn't work.
And the 3rd problem, I also get a minor lag when I tried to load the game and when the battle appeared.
Do I need to move your script? I put it on the above of the Main Script, and I also have some scripts on top of it.
I appreciate your help
🙂 🙂 🙂
P.S I'll have The National Final Examination on this weeks, so I'll probably be active again after 15 th April, so, sorry for slow reply.
🙁