Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ####################################################################
- # Audio in menu
- #
- # By: SojaBird
- # Discription: Play BGM in the menu
- #
- ####################################################################
- module Audio_Setup
- BGM = "Town2" # The name of the bgm, leave empty ("") to shut off this function ["..."].
- Volume = 100 # The volume of the bgm [0-100].
- Pitch = 100 # The pitch of the bgm [50-150].
- end
- #==============================================================================
- # ** Scene_Menu
- #------------------------------------------------------------------------------
- # This class performs the menu screen processing.
- #==============================================================================
- class Scene_Menu < Scene_Base
- include Audio_Setup
- alias audio_start start
- alias audio_update_command_selection update_command_selection
- #--------------------------------------------------------------------------
- # * Start processing
- #--------------------------------------------------------------------------
- def start
- audio_start
- Audio.bgm_play("Audio/BGM/" + BGM, Volume, Pitch) if BGM != ""
- end
- #--------------------------------------------------------------------------
- # * Update Command Selection
- #--------------------------------------------------------------------------
- def update_command_selection
- if Input.trigger?(Input::B)
- Audio.bgm_stop
- $game_map.autoplay
- end
- audio_update_command_selection
- end
- end
Add Comment
Please, Sign In to add comment