Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ==============================================================================
- # ▼▼▼▼▼▼ TroyZ - Scrolling Text Extended ▼▼▼▼▼▼
- # ==============================================================================
- # Script by : Agung Prasetyo(TroyZ)
- # Contact me by : - Email agung.endisnear.xyz@gmail.com
- # - Forum RPGMakerID, username TroyZ
- # - Handphone 085756289121
- # Engine : VXAce
- # Level : Easy
- # Version : 1.0
- # ------------------------------------------------------------------------------
- # Change Logs :
- # 25 November 2013 : Version 1.0 released
- # ------------------------------------------------------------------------------
- # How this work :
- # Getting bored of the ordinary scrolling text that scrolling from the bottom
- # of the screen? This script can make the scrolling text appear also from the
- # top of the screen.
- # ------------------------------------------------------------------------------
- # How to use :
- # Place it between material and main.
- #
- # You can alter the direction type of scrolling text by using script call :
- # - scroll_dir(value)
- # When value is the new value. There are 2 types of scrolling :
- # 1. The scrolling text appear at the top.
- # 2. The scrolling text appear at the bottom (default).
- #
- # So input the value either 1 or 2 in the script call.
- # ------------------------------------------------------------------------------
- # Compatibility issues :
- # None yet. If you found some, let me know, and bug fixes will come out soon.
- # ------------------------------------------------------------------------------
- # Who to credit :
- # - Allah swt. : For the chance of living that he has given to me.
- # - Nabi Muhammad saw. : As a leader and messenger and prophet of Muslim.
- # I'm proud to be your follower. :)
- # - Agung Prasetyo(TroyZ) : Me? Whatever, i don't need it actually. :P
- # ------------------------------------------------------------------------------
- # License :
- # - Free Game : Just credit those names above.
- # - Commercial Game : Same as free game's license.
- # ------------------------------------------------------------------------------
- $imported = {} if $imported.nil?
- $imported[:TroyZ_ScrollingTextExtended] = true
- # ------------------------------------------------------------------------------
- # Configuration of script starts here
- # ------------------------------------------------------------------------------
- module AGUNG
- module EXT_SCROLL_TXT
- SCROLL_DIR = 2 # the default value of scrolling
- end
- end
- # ------------------------------------------------------------------------------
- # End of Configuration
- # ------------------------------------------------------------------------------
- # ------------------------------------------------------------------------------
- # You shall not pass
- # ------------------------------------------------------------------------------
- class Game_System
- attr_accessor :scroll_dir
- alias agung_scroll_dir_init_x initialize
- def initialize
- agung_scroll_dir_init_x
- @scroll_dir = AGUNG::EXT_SCROLL_TXT::SCROLL_DIR
- end
- end
- class Game_Interpreter
- def scroll_dir(value)
- $game_system.scroll_dir = value
- end
- end
- class Window_ScrollText < Window_Base
- def refresh
- reset_font_settings
- update_all_text_height
- create_contents
- draw_text_ex(4, 0, @text)
- case $game_system.scroll_dir
- when 1
- self.oy = @scroll_pos = contents.height
- when 2
- self.oy = @scroll_pos = -height
- end
- end
- def update_message
- case $game_system.scroll_dir
- when 1
- @scroll_pos -= scroll_speed
- self.oy = @scroll_pos
- terminate_message if @scroll_pos <= -height
- when 2
- @scroll_pos += scroll_speed
- self.oy = @scroll_pos
- terminate_message if @scroll_pos >= contents.height
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement