Advertisement
TroyZ

TroyZ - Title SE Select

Dec 4th, 2013
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 4.44 KB | None | 0 0
  1. # ==============================================================================
  2. # ▼▼▼▼▼▼                     TroyZ - Title SE Select                      ▼▼▼▼▼▼
  3. # ==============================================================================
  4. # Script by : Agung Prasetyo(TroyZ)
  5. # Contact me by : - Email agung.endisnear.xyz@gmail.com
  6. #                 - Forum RPGMakerID, username TroyZ
  7. #                 - Handphone 085756289121
  8. # Engine : VXAce
  9. # Level : Easy
  10. # Version : 1.0
  11. # ------------------------------------------------------------------------------
  12. # Change Logs :
  13. # 5 December 2013 : Version 1.0 released
  14. # ------------------------------------------------------------------------------
  15. # How this work :
  16. # This script allows you to add custom SE when the title command is selected.
  17. # ------------------------------------------------------------------------------
  18. # How to use :
  19. # Place it between material and main. Just config the script module and you're
  20. # done.
  21. # ------------------------------------------------------------------------------
  22. # Compatibility issues :
  23. # None yet. If you found some, let me know, and bug fixes will come out soon.
  24. # ------------------------------------------------------------------------------
  25. # Who to credit :
  26. # - Allah swt. : For the chance of living that he has given to me.
  27. # - Nabi Muhammad saw. : As a leader and messenger and prophet of Muslim.
  28. #                        I'm proud to be your follower. :)
  29. # - Agung Prasetyo(TroyZ) : Thats me, of course, the ones that made this script. :P
  30. # ------------------------------------------------------------------------------
  31. # License :
  32. # - Free Game : Just credit those names above.
  33. # - Commercial Game : Same as free game's license.
  34. # ------------------------------------------------------------------------------
  35. $imported = {} if $imported.nil?
  36. $imported[:TroyZ_TitleSESelect] = true
  37. # ------------------------------------------------------------------------------
  38. # Configuration of script start here
  39. # ------------------------------------------------------------------------------
  40. module AGUNG
  41.   module TITLE_SE_SELECT
  42.     USE_DEFAULT_NEW_GAME_SE = false
  43.     SE_NEW_GAME = "Audio/SE/Resident Evil Start Sound Effect.mp3" # The SE to be
  44.     # played. Set it to nil if you don't want to use it
  45.     SE_NEW_GAME_VOLUME = 100 # The SE Volume
  46.     SE_NEW_GAME_PITCH = 100 # The SE Pitch
  47. #-------------------------------------------------------------------------------
  48.     USE_DEFAULT_LOAD_GAME_SE = true
  49.     SE_LOAD_GAME = nil # The SE to be
  50.     # played. Set it to nil if you don't want to use it
  51.     SE_LOAD_GAME_VOLUME = 100 # The SE Volume
  52.     SE_LOAD_GAME_PITCH = 100 # The SE Pitch
  53. #-------------------------------------------------------------------------------
  54.     USE_DEFAULT_EXIT_GAME_SE = true
  55.     SE_EXIT_GAME = nil # The SE to be
  56.     # played. Set it to nil if you don't want to use it
  57.     SE_EXIT_GAME_VOLUME = 100 # The SE Volume
  58.     SE_EXIT_GAME_PITCH = 100 # The SE Pitch
  59.   end
  60. end
  61. # ------------------------------------------------------------------------------
  62. # End of configuration
  63. # ------------------------------------------------------------------------------
  64.  
  65. # ------------------------------------------------------------------------------
  66. # You shall not pass
  67. # ------------------------------------------------------------------------------
  68. class Window_TitleCommand < Window_Command
  69.   def process_ok
  70.     if current_item_enabled?      
  71.       Input.update
  72.       deactivate
  73.       call_ok_handler
  74.     else
  75.       Sound.play_buzzer
  76.     end
  77.   end
  78. end
  79.  
  80. class Scene_Title < Scene_Base
  81.   include AGUNG::TITLE_SE_SELECT
  82.  
  83.   alias agung_se_select_new_game_x    command_new_game
  84.   def command_new_game  
  85.     Sound.play_ok if USE_DEFAULT_NEW_GAME_SE
  86.     Audio.se_play(SE_NEW_GAME, SE_NEW_GAME_VOLUME, SE_NEW_GAME_PITCH) if SE_NEW_GAME != nil
  87.     agung_se_select_new_game_x
  88.   end
  89.  
  90.   alias agung_se_select_load_game_x   command_continue
  91.   def command_continue
  92.     Sound.play_ok if USE_DEFAULT_LOAD_GAME_SE
  93.     Audio.se_play(SE_LOAD_GAME, SE_LOAD_GAME_VOLUME, SE_LOAD_GAME_PITCH) if SE_LOAD_GAME != nil
  94.     agung_se_select_load_game_x
  95.   end
  96.  
  97.   alias agung_se_select_exit_game_x   command_shutdown
  98.   def command_shutdown
  99.     Sound.play_ok if USE_DEFAULT_EXIT_GAME_SE
  100.     Audio.se_play(SE_EXIT_GAME, SE_EXIT_GAME_VOLUME, SE_EXIT_GAME_PITCH) if SE_EXIT_GAME != nil
  101.     agung_se_select_exit_game_x
  102.   end
  103. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement