Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # Continue BGM after battle
- # Author: DiamondandPlatinum3
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # Description:
- #
- # Activated via an event switch, this script will allow you to continue
- # to play your battle bgm once your battle has finished. Maybe you're
- # in a war zone and need to keep the Battle bgm going to continue the
- # atmosphere?
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- class Scene_Battle
- #////////////////////////////////////////////////////////////
- # Event Switch ID to make the battle bgm continue into map
- BATTLE_BGM_CIM_EVENT_SWITCH_ID = 11
- #////////////////////////////////////////////////////////////
- #--------------------------------------------------------------------------
- # * Victory Processing
- #--------------------------------------------------------------------------
- alias battlebgm_cim_unchange_processvictory_on4972 process_victory
- def process_victory
- if $game_switches[BATTLE_BGM_CIM_EVENT_SWITCH_ID]
- @info_viewport.visible = false
- @message_window.visible = true
- $game_system.battle_end_me.play
- display_exp_and_gold
- display_drop_items
- display_level_up
- battle_end(0)
- else
- battlebgm_cim_unchange_processvictory_on4972
- end
- end
- #--------------------------------------------------------------------------
- # * End Battle
- # result : Results (0: win, 1: escape, 2:lose)
- #--------------------------------------------------------------------------
- alias battlebgm_cim_unchange_battleend_on4972 battle_end
- def battle_end(result)
- if $game_switches[BATTLE_BGM_CIM_EVENT_SWITCH_ID]
- if result == 2 and not $game_troop.can_lose
- call_gameover
- else
- $game_party.clear_actions
- $game_party.remove_states_battle
- $game_troop.clear
- if $game_temp.battle_proc != nil
- $game_temp.battle_proc.call(result)
- $game_temp.battle_proc = nil
- end
- $scene = Scene_Map.new
- @message_window.clear
- Graphics.fadeout(30)
- end
- $game_temp.in_battle = false
- else
- battlebgm_cim_unchange_battleend_on4972(result)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement