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 - WSAD Movement
- # -- Author : Dekita
- # -- Version : 1.0
- # -- Level : Easy
- # -- Requires : N/A
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:WSAD_Move]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 27/o3/2o13 - Started, Finished,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # A simple script to allow for WSAD movement rather than the VX Ace default.
- #
- # If Paired with my $D13x Core Script, then it also allows most keyboard
- # keys to control the movement(rather then WSAD).
- #
- # NOTE : In Order for the customization options to work, you MUST
- # have the $D13x Core script.
- # The script will function fine without the core but it will be limited to
- # WSAD Controls.
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ 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
- #-------------------------------------------------------------------------------
- # Heres a list of :key_symbols ( if using my $D13x Core )
- #
- # Letters
- # :A, :B, :C, :D, :E, :F, :G, :H, :I, :J, :K, :L, :M, :N, :O, :P, :Q, :R
- # :S, :T, :U, :V, :W, :X, :Y, :Z
- # Numbers
- # :_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9, :_0,
- # Other
- # :SHIFT, :LSHIFT, :RSHIFT, :TAB, :LEFT, :RIGHT, :UP, :DOWN, :PAUSE
- #
- # To Disable A Key, Make Symbol :NONE,
- #
- #===============================================================================
- module WSAD_Move
- #===============================================================================
- $D13x[:CORE]?Key=Keys::Key: Key={}# << KEEP
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Settings
- #--------------------------------------------------------------------------
- # ALL settings Require my $D13x - Core to take effect !!
- Up = Key[ :W ]
- Down = Key[ :S ]
- Left = Key[ :A ]
- Right = Key[ :D ]
- OverWrite_Sprint_Key = true
- Sprint = Key[ :RSHIFT ] #####################
- # 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 Input
- #===============================================================================
- #---------------------------------------------------------------------------
- # Dir4 Using $D13x Key Input
- #---------------------------------------------------------------------------
- def self.dir4
- return old_key_WSAD_dir4 unless $D13x[:CORE]
- return 2 if Keys.press?(WSAD_Move::Down)
- return 4 if Keys.press?(WSAD_Move::Left)
- return 6 if Keys.press?(WSAD_Move::Right)
- return 8 if Keys.press?(WSAD_Move::Up)
- return 0
- end
- #---------------------------------------------------------------------------
- # Dir4 using default Vx Ace Key Input
- #---------------------------------------------------------------------------
- def self.old_key_WSAD_dir4
- return 2 if Input.press?(:Y)
- return 4 if Input.press?(:X)
- return 6 if Input.press?(:Z)
- return 8 if Input.press?(:R)
- return 0
- end
- end
- if WSAD_Move::OverWrite_Sprint_Key
- #==============================================================================
- class Game_Player < Game_Character
- #==============================================================================
- #---------------------------------------------------------------------------
- # Alias List
- #---------------------------------------------------------------------------
- alias :new_dash? :dash?
- #--------------------------------------------------------------------------
- # Determine if Dashing (overwrite)
- #--------------------------------------------------------------------------
- def dash?
- return new_dash? unless $D13x[:CORE]
- return false if @move_route_forcing
- return false if $game_map.disable_dash?
- return false if vehicle
- return Keys.press?(WSAD_Move::Sprint)
- end
- end
- end # << WSAD_Move::OverWrite_Sprint_Key
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
- end # if false // true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement