Advertisement
roninator2

DP3 - BGM music for Menu

Dec 7th, 2024
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.01 KB | None | 0 0
  1. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. #             Play BGM on main menu
  3. #             Author: DiamondandPlatinum3
  4. #             Modded by Roninator2 for Main Menu Music
  5. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  6. #  Description:
  7. #
  8. #    This script allows you to play BGM on the main menu.
  9. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  10. class Scene_Menu < Scene_MenuBase
  11.   #======================================
  12.   #       Editable Region
  13.   #======================================
  14.   BGM_MUSIC_FOR_MENU_SCREEN  = "Scene6"
  15.   BGM_VOLUME                 = 100
  16.   BGM_PITCH                  = 100
  17.   #======================================
  18.  
  19.   alias play_music_onmenuscreen start
  20.   def start
  21.     @map_bgm = RPG::BGM.last
  22.     RPG::BGM.new(BGM_MUSIC_FOR_MENU_SCREEN, BGM_VOLUME, BGM_PITCH).play
  23.     play_music_onmenuscreen
  24.   end
  25.  
  26.   def return_scene
  27.     @map_bgm.replay
  28.     SceneManager.return
  29.   end
  30.  
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement