VanCoolz

[RGSS/2] Level Up SE

May 9th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.29 KB | None | 0 0
  1. #==============================================================================
  2. # [RGSS/2] Level Up SE
  3. # Version : 1.1
  4. # Author : LowlingLife
  5. #==============================================================================
  6. # Script ini akan memainkan SE setiap ada aktor yang Level-Up.
  7. #==============================================================================
  8. # CHANGELOG
  9. # V 1.0 | Initial Release
  10. # V 1.1 | Cross Engine
  11. #==============================================================================
  12. module LevelUpSE
  13.   # SE yang akan dimainkan setiap kali level-up.
  14.   # Level => [Filename, Volume, Pitch]
  15.   LEVEL_SE = {
  16.   2 => ["001-System01", 100, 100],
  17.   3 => ["002-System02", 100, 100]
  18.   }
  19. end
  20. #------------------------------------------------------------------------------
  21. # EDITING BEYOND THIS LINE CAN CAUSE DAMAGE TO YOUR GAME.
  22. #------------------------------------------------------------------------------
  23. VX = defined?(Window_ActorCommand)
  24. level = VX ? "change_level" : "level="
  25. eval "
  26. class Game_Actor < Game_Battler
  27.  include LevelUpSE
  28.  alias level_se #{level} unless $@
  29.  def #{level}(*args, &block)
  30.    level_se(*args, &block)
  31.    LEVEL_SE.each{|level, sound|
  32.    if @level == level
  33.      Audio.se_play('Audio/SE/' + sound[0], sound[1], sound[2])
  34.    end}
  35.  end
  36.  end#"
Advertisement
Add Comment
Please, Sign In to add comment