#===================================
# Leon's battle BGM Fix
#----------------------------------------------------------------------
# Feature:
# You can turn off the battle music for battles, and let the
# bgm play through. It will only be interupted by the music
# effect of battle, then the music fades back in.
#
# Instructions:
# Place after Scene_Debug, but before Main
# set SWITCH_TO_BYPASS equal to the switch that needs
# to be on for this to work. So, if SWITCH_TO_BYPASS equalled 1,
# and switch 1 is on, the BGM plays through battle. When switch
# 1 is off, it will turn on the battle background music.
#===================================
class Scene_Map
alias leon_bgmfix_scenemap_callbattle call_battle
SWITCH_TO_BYPASS = 12
def call_battle
$game_temp.battle_calling = false
$game_temp.menu_calling = false
$game_temp.menu_beep = false
$game_player.make_encounter_count
$game_temp.map_bgm = $game_system.playing_bgm
$game_system.se_play($data_system.battle_start_se)
unless $game_switches[SWITCH_TO_BYPASS] == true
$game_system.bgm_stop
$game_system.bgm_play($game_system.battle_bgm)
end
$game_player.straighten
$scene = Scene_Battle.new
end
end
#===================================
# Leon's battle BGM Fix
#----------------------------------------------------------------------
# Feature:
# You can turn off the battle music for battles, and let the
# bgm play through. It will only be interupted by the music
# effect of battle, then the music fades back in.
#
# Instructions:
# Place after Scene_Debug, but before Main
# set SWITCH_TO_BYPASS equal to the switch that needs
# to be on for this to work. So, if SWITCH_TO_BYPASS equalled 1,
# and switch 1 is on, the BGM plays through battle. When switch
# 1 is off, it will turn on the battle background music.
#===================================
class Scene_Map
alias leon_bgmfix_scenemap_callbattle call_battle
SWITCH_TO_BYPASS = 12
def call_battle
$game_temp.battle_calling = false
$game_temp.menu_calling = false
$game_temp.menu_beep = false
$game_player.make_encounter_count
$game_temp.map_bgm = $game_system.playing_bgm
$game_system.se_play($data_system.battle_start_se)
unless $game_switches[SWITCH_TO_BYPASS] == true
$game_system.bgm_stop
$game_system.bgm_play($game_system.battle_bgm)
end
$game_player.straighten
$scene = Scene_Battle.new
end
end
#===================================
# Leon's battle BGM Fix
#----------------------------------------------------------------------
# Feature:
# You can turn off the battle music for battles, and let the
# bgm play through. It will only be interupted by the music
# effect of battle, then the music fades back in.
#
# Instructions:
# Place after Scene_Debug, but before Main
# set SWITCH_TO_BYPASS equal to the switch that needs
# to be on for this to work. So, if SWITCH_TO_BYPASS equalled 1,
# and switch 1 is on, the BGM plays through battle. When switch
# 1 is off, it will turn on the battle background music.
#===================================
class Scene_Map
alias leon_bgmfix_scenemap_callbattle call_battle
SWITCH_TO_BYPASS = 12
def call_battle
$game_temp.battle_calling = false
$game_temp.menu_calling = false
$game_temp.menu_beep = false
$game_player.make_encounter_count
$game_temp.map_bgm = $game_system.playing_bgm
$game_system.se_play($data_system.battle_start_se)
unless $game_switches[SWITCH_TO_BYPASS] == true
$game_system.bgm_stop
$game_system.bgm_play($game_system.battle_bgm)
end
$game_player.straighten
$scene = Scene_Battle.new
end
end
Cái này có cần lệnh gọi script không ạ? ;;w;;
xài switch trong script ghi hướng dẫn hết rồi mà .-.
bác thử thêm cả script này vào,để trên Main, trước script Leon's Battle BGM Fix. Đây là fix của Shaz
class Game_System
alias preserve_bgm_bgm_play bgm_play
def bgm_play(bgm)
preserve_bgm_bgm_play if !$game_switches[15] # <<<<<<<<<<<<<<<<<<<< PUT YOUR SWITCH NUMBER HERE
end
end
class Scene_Map
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
# Change bgm if preserve switch is off
if !$game_switches[15] # <<<<<<<<<<<<<<<<<<<<<<<<<<< PUT YOUR SWITCH NUMBER HERE
# Memorize map BGM and stop BGM
$game_temp.map_bgm = $game_system.playing_bgm
$game_system.bgm_stop
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
end
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Straighten player position
$game_player.straighten
# Switch to battle screen
$scene = Scene_Battle.new
end
end
Nếu như mà có script nào mà chỉnh sửa method âm thanh của game thì có thể 2 script này sẽ không hoạt động. Không được nữa thì chắc chịu :v
bác thử thêm cả script này vào,để trên Main, trước script Leon's Battle BGM Fix. Đây là fix của Shaz
class Game_System
alias preserve_bgm_bgm_play bgm_play
def bgm_play(bgm)
preserve_bgm_bgm_play if !$game_switches[15] # <<<<<<<<<<<<<<<<<<<< PUT YOUR SWITCH NUMBER HERE
end
end
class Scene_Map
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
# Change bgm if preserve switch is off
if !$game_switches[15] # <<<<<<<<<<<<<<<<<<<<<<<<<<< PUT YOUR SWITCH NUMBER HERE
# Memorize map BGM and stop BGM
$game_temp.map_bgm = $game_system.playing_bgm
$game_system.bgm_stop
# Play battle BGM
$game_system.bgm_play($game_system.battle_bgm)
end
# Play battle start SE
$game_system.se_play($data_system.battle_start_se)
# Straighten player position
$game_player.straighten
# Switch to battle screen
$scene = Scene_Battle.new
end
end
Nếu như mà có script nào mà chỉnh sửa method âm thanh của game thì có thể 2 script này sẽ không hoạt động. Không được nữa thì chắc chịu :v
Thực ra trong VX Ace, BGM sẽ không reset chừng nào mình chọn Stop/Replay hoặc đổi sang BGM khác (kể cả khi chỉnh volumn).
Khi transfer nhân vật vào map,
Comments
Cái này có cần lệnh gọi script không ạ? ;;w;;
xài switch trong script ghi hướng dẫn hết rồi mà .-.
HÌnh như có gì không ổn ạ ;;w;;
:rolleyes: :rolleyes: :rolleyes: :rolleyes: :rolleyes: :rolleyes:
Chưa triệt để, nhưng nếu chấp nhận đc như vậy thì .. fine.
Khi transfer nhân vật vào map,
thì lúc vào battle, BGM vẫn chạy tiếp như thường.
So we don't need script anymore.