Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if true # << Make true to use this script, false to disable.
- #===============================================================================
- #
- # ☆ $D13x - Common Event Keys
- # -- Author : Dekita
- # -- Version : 1.1
- # -- Level : Easy / Normal
- # -- Requires : $D13x Core v1.6
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Common_Ev_Keys]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 17/o5/2o13 - Update, (Key Menu HUD now shows Event Keys)
- # o4/o4/2o13 - Started, Finished,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This script simply allows for common events to be triggered when a key has
- # been triggered (initially pressed), you can have as many common event keys
- # as you wish.
- # Option to disable each common event key with its own switch.
- # And the option to disable all common event keys while moving.
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- #===============================================================================
- # 1. You MUST give credit to "Dekita" !!
- # 2. You are NOT allowed to repost this script.(or modified versions)
- # 3. You are NOT allowed to convert this script.
- # 4. You are NOT allowed to use this script for Commercial games.
- # 5. ENJOY!
- #
- # "FINE PRINT"
- # By using this script you hereby agree to the above terms and conditions,
- # if any violation of the above terms occurs "legal action" may be taken.
- # Not understanding the above terms and conditions does NOT mean that
- # they do not apply to you.
- # If you wish to discuss the terms and conditions in further detail you can
- # contact me at http://dekitarpg.wordpress.com/
- #
- #===============================================================================
- # ☆ Instructions
- #-------------------------------------------------------------------------------
- # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
- #
- #===============================================================================
- # ☆ HELP
- #-------------------------------------------------------------------------------
- # For a list of possible key symbols check the help section of the
- # $D13x core script.
- #
- #===============================================================================
- module CMN_Ev_Keys
- #===============================================================================
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ General Settings
- #-----------------------------------------------------------------------------
- # Make this false to dis-allow common events to be triggered
- # while player is moving.
- Trigger_While_Move = true
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Event Key Settings
- #-----------------------------------------------------------------------------
- # :ID = the id of the key to press for the event to trigger.
- # event = is the id of the common event to trigger
- # switch = the id of the switch to enable/disable the key trigger
- # ^- leave switch 0 to always allow the key to trigger the event.
- # show, x, y, icon && hue are only used if using my key menu HUD script.
- Triggers=[
- # [ :ID , Event , switch , show?, x , y , icon , hue]
- [ :T , 1 , 7 , true , 184, 2 , 114 , 0 ],
- [ :V , 2 , 8 , true , 210, 2 , 4 , 0 ],
- [ :B , 3 , 9 , true , 236, 2 , 9 , 0 ],
- # << Add more [key,event,switch], here.
- ]# << Keep
- #####################
- # CUSTOMISATION END #
- end #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
- # YES?\.\. #
- # OMG, REALLY? \| #
- # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
- # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
- #===============================================================================#
- module CMN_Ev_Keys
- #===============================================================================
- #--------------------------------------------------------------------------
- # Update Method For Common Event Triggers
- #--------------------------------------------------------------------------
- def update_cmn_ev_keys
- return unless !$game_map.interpreter.running?
- return if $game_player.moving? unless Trigger_While_Move
- Triggers.each do |block|
- next if (block[2] != 0) && (!$game_switches[block[2]])
- if (Keys.trigger?(Keys::Key[block[0]])) && (block[1] != 0)
- $game_temp.reserve_common_event( block[1] )
- end
- end
- end
- end
- #===============================================================================
- class Scene_Map < Scene_Base
- #===============================================================================
- #--------------------------------------------------------------------------
- # Included Modules
- #--------------------------------------------------------------------------
- include CMN_Ev_Keys
- #--------------------------------------------------------------------------
- # Alias List
- #--------------------------------------------------------------------------
- alias :update_deki_cmnevs :update
- #--------------------------------------------------------------------------
- # Frame Update
- #--------------------------------------------------------------------------
- def update
- update_deki_cmnevs
- update_cmn_ev_keys
- end
- end
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
- end # if true # << Make true to use this script, false to disable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement