Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- #
- # ▼ Moby's Script System - Text SE V1.0
- # -- Last Updated: 2012.07.23
- #
- #==============================================================================
- $imported = {} if $imported.nil?
- $imported["MSS-Text_SE"] = 1.0
- #==============================================================================
- # ▼ Updates
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # N/A
- #
- #==============================================================================
- # ▼ Introduction
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # This Script plays a SE you define in the module at the top every x letters.
- # Possible Settings:
- # - SE File Name
- # - Pitch Range
- # - Volume
- # - Interval(x)
- #
- #==============================================================================
- # ▼ Instructions
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # To install this script, open up your script editor and copy/paste this script
- # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
- #
- # All settings possible are placed in the module at the top.
- #
- # If you have any questions, bugs you want to report or anything else,
- # please contact me at mobychan@gmx.de or via my profile on
- # http://forums.rpgmakerweb.com (mobychan) or
- # http://w11.zetaboards.com/RMParadise/index/ (mobychan).
- #
- #
- #==============================================================================
- # ▼ Compatibility
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
- # it will run with RPG Maker VX without adjusting.
- #
- #==============================================================================
- #
- #==============================================================================
- # ▼ Methods changed/added
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # -----------------------------------------------------------------------------
- # Aliased methods:
- # -----------------------------------------------------------------------------
- # class Window_Message:
- # - initialize
- # - process_normal_character
- # - process_new_page
- #
- # -----------------------------------------------------------------------------
- # Added methods:
- # -----------------------------------------------------------------------------
- # module Sound:
- # - self.play_text_se
- #
- #==============================================================================
- #
- #==============================================================================
- # ▼ Compatibility Issues
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # Since this script doesn't override anything there shouldn't be any issues.
- # I fsomething doesn't work properly, try putting this script below every other
- # script.
- #==============================================================================
- module TSE
- # The name of the file that will be played, must be placed in Audio/SE
- SE = "Cursor1"
- # The pitch range of the file being played
- # [start_pitch, end_pitch]
- # start and end pitch can be the same to have a static pitch
- Pitch = [150, 175]
- # The volume of the file being played
- Volume = 100
- # The interval at which the sound is being played, every x characters
- Interval = 4
- end
- #==============================================================================
- # ** Sound
- #==============================================================================
- module Sound
- # System Sound Effect
- def self.play_text_se
- file = "Audio/SE/" + TSE::SE
- pitch = rand(TSE::Pitch[1] - TSE::Pitch[0]) + TSE::Pitch[0]
- Audio.se_play(file, TSE::Volume, pitch)
- end
- end
- #==============================================================================
- # ** Window_Message
- #==============================================================================
- class Window_Message < Window_Base
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- alias tse_init initialize unless $@
- def initialize
- tse_init
- @character = 0
- end
- #--------------------------------------------------------------------------
- # * Normal Character Processing
- #--------------------------------------------------------------------------
- alias tse_process_normal_character process_normal_character unless $@
- def process_normal_character(c, pos)
- tse_process_normal_character(c, pos)
- Sound.play_text_se if @character % TSE::Interval == 0 && !@line_show_fast
- @character += 1
- end
- #--------------------------------------------------------------------------
- # * New Page Character Processing
- #--------------------------------------------------------------------------
- alias tse_process_new_page process_new_page unless $@
- def process_new_page(text, pos)
- tse_process_new_page(text, pos)
- @character = 0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement