neutale

Scrolling Text Speed Control

Feb 10th, 2018
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.27 KB | None | 0 0
  1. #==============================================================================
  2. #                   「Scrolling Text Speed Control」(ACE) ver1.0
  3. #   Author: Nana
  4. #   Homepage: http://heptanas.mamagoto.com/
  5. #
  6. #   ◇Terms of Use
  7. #   Please credit "Nana" and link http://heptanas.mamagoto.com/ if possible.
  8. #   Feel free to modify this script and/or distribute it.
  9. #   Also please include the credit in the readme or somewhere it's accessible. (Not from credit roll)
  10. #  
  11. #   ◇Non-commercial use
  12. #
  13. #------------------------------------------------------------------------------
  14. #
  15. #   It's possible to set the speed for scrolling text.
  16. #   You can change the speed by pressing a certain key.
  17. #  
  18. #   Please include a numerical value by default.
  19. #
  20. #==============================================================================
  21. #◇Initial Setting
  22. module Nana_STC
  23.  
  24.   SPEED = 1       #Normal scroll speed, default = 1
  25.  
  26.   A_SPEED = 2     #Scroll speed from A button (confirm key) when pressed.
  27.  
  28.   B_SPEED = 1000  #Scroll speed from B button (cancel key) when pressed.
  29.  
  30.   C_SPEED = 1     #Scroll speed when C button (subkey) is pressed.
  31.  
  32. end
  33.  
  34. #==============================================================================
  35. # ■ Window_ScrollText
  36. #------------------------------------------------------------------------------
  37. # Window used for Scroll Text. Although frames are not displayed-
  38. # It's treated as a window for convenience.
  39. #==============================================================================
  40.  
  41. class Window_ScrollText < Window_Base
  42.   #--------------------------------------------------------------------------
  43.   # ● Acquired scroll speed
  44.   #--------------------------------------------------------------------------
  45.   def scroll_speed
  46.     $game_message.scroll_speed * show_fast? * 0.5
  47.   end
  48.   #--------------------------------------------------------------------------
  49.   # ● Fast forward control
  50.   #--------------------------------------------------------------------------
  51.   def show_fast?
  52.     return Nana_STC::SPEED if $game_message.scroll_no_fast
  53.     return Nana_STC::A_SPEED if Input.press?(:A)
  54.     return Nana_STC::B_SPEED if Input.press?(:B)
  55.     return Nana_STC::C_SPEED if Input.press?(:C)
  56.     return Nana_STC::SPEED
  57.   end
  58. end
Add Comment
Please, Sign In to add comment