Advertisement
neutale

Scrolling Text Pause

Jun 17th, 2019
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.32 KB | None | 0 0
  1. =begin
  2. RGSS3 Scrolling Text Pause 2012/05/24 mo-to
  3. TKOOL COOL
  4. http://mototkool.blog.fc2.com/
  5.  
  6. ★Overview★
  7. Adds a pause function during text scrolling while holding the specified key.
  8.  
  9. ★Usage★
  10. Paste this script above Main.
  11.  
  12. ★Note★
  13. C and A buttons are used for fast forward by default.
  14. If you put a pause button, this pause function has a rule.
  15. Pause function is disabled if "Fast-forward is invalid"
  16. if checked in the event command.
  17. =end
  18.  
  19. #↓Customization
  20. module MOTO
  21.  
  22. #Specify a key to pause text scrolling while pressed
  23. #:DOWN 下 :UP 上 :LEFT 左 :RIGHT 右 :L :R :Y :X (for fast forward:C :A)
  24. MESS_STOP = :DOWN
  25.  
  26. end
  27. #So far
  28.  
  29. class Window_ScrollText < Window_Base
  30.   #--------------------------------------------------------------------------
  31.   # ○ Start scroll pause
  32.   #--------------------------------------------------------------------------
  33.   alias stop_scroll_speed scroll_speed
  34.   def scroll_speed
  35.     return $game_message.scroll_speed * 0 if show_stop?
  36.    
  37.     stop_scroll_speed
  38.   end
  39.   #--------------------------------------------------------------------------
  40.   # ☆ Scroll pause control
  41.   #--------------------------------------------------------------------------
  42.   def show_stop?
  43.     !$game_message.scroll_no_fast && Input.press?(MOTO::MESS_STOP)
  44.   end  
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement