Advertisement
diamondandplatinum3

Play SE on Critical Hit ~ RGSS3

Dec 10th, 2012
645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.22 KB | None | 0 0
  1. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. #             Play SE on Critical Hit
  3. #             Author: DiamondandPlatinum3
  4. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  5. #  Description:
  6. #
  7. #    This script will allow you to play a Sound Effect when any active battler
  8. #    Scores a critical hit.
  9. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  10.  
  11.  
  12.  
  13. class Game_Battler
  14.   #==================================================
  15.   #           EDITABLE REGION
  16.   #==================================================
  17.   CRITICAL_HIT_SE     = "Applause1"
  18.   CRITICAL_HIT_VOLUME = 80
  19.   CRITICAL_HIT_PITCH  = 100
  20.   #==================================================
  21.  
  22.  
  23.   #--------------------------------------------------------------------------
  24.   # * Apply Critical
  25.   #--------------------------------------------------------------------------
  26.   alias playsound_oncritical      apply_critical
  27.   #--------------------------------------------------------------------------
  28.   def apply_critical(*args)
  29.     RPG::SE.new(CRITICAL_HIT_SE, CRITICAL_HIT_VOLUME, CRITICAL_HIT_PITCH).play
  30.     return playsound_oncritical(*args)
  31.   end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement