MUSHRA

Degug Speed VX

Jul 27th, 2012
52
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Set variable to false.
  2. $using = false
  3. class Scene_Map
  4.   #Alias the update method in Scene_Map.
  5.   alias gammastar_speedupdate update
  6.   #By aliasing, I add to the method instead of actually defining it.
  7.   def update
  8.     #Refer to alias (can't work without this)
  9.     gammastar_speedupdate
  10.     #Check to see if in debug and if F6 is pressed.
  11.     if $TEST and Input.trigger?(Input::F6)
  12.       #Check to see if you are using the speeder.
  13.       if $using == false
  14.         Graphics.frame_rate = 120
  15.         Sound.play_decision
  16.         $using = true
  17.       else
  18.         Graphics.frame_rate = 60
  19.         Sound.play_cancel
  20.         $using = false
  21.       end
  22.     end
  23.   end  
  24. end
  25.  
  26. #Essentially the same as above.
  27. class Scene_Battle
  28.   alias gammastar_speedupdate_b update
  29.   def update
  30.     gammastar_speedupdate_b
  31.     if $TEST and Input.trigger?(Input::F6)
  32.       if $using == false
  33.         Graphics.frame_rate = 120
  34.         Sound.play_decision
  35.         $using = true
  36.       else
  37.         Graphics.frame_rate = 60
  38.         Sound.play_cancel
  39.         $using = false
  40.       end
  41.     end
  42.   end
  43. end
RAW Paste Data