Advertisement
Dekita

$D13x WSAD Move v1.0

Mar 28th, 2013
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.93 KB | None | 0 0
  1. if true # << Make true to use this script, false to disable.
  2. #===============================================================================
  3. #
  4. # ☆ $D13x - WSAD Movement
  5. # -- Author : Dekita
  6. # -- Version : 1.0
  7. # -- Level : Easy
  8. # -- Requires : N/A
  9. # -- Engine : RPG Maker VX Ace.
  10. #
  11. #===============================================================================
  12. # ☆ Import
  13. #-------------------------------------------------------------------------------
  14. $D13x={}if$D13x==nil
  15. $D13x[:WSAD_Move]=true
  16. #===============================================================================
  17. # ☆ Updates
  18. #-------------------------------------------------------------------------------
  19. # D /M /Y
  20. # 27/o3/2o13 - Started, Finished,
  21. #
  22. #===============================================================================
  23. # ☆ Introduction
  24. #-------------------------------------------------------------------------------
  25. # A simple script to allow for WSAD movement rather than the VX Ace default.
  26. #
  27. # If Paired with my $D13x Core Script, then it also allows most keyboard
  28. # keys to control the movement(rather then WSAD).
  29. #
  30. # NOTE : In Order for the customization options to work, you MUST
  31. # have the $D13x Core script.
  32. # The script will function fine without the core but it will be limited to
  33. # WSAD Controls.
  34. #
  35. #===============================================================================
  36. # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  37. #===============================================================================
  38. # 1. You MUST give credit to "Dekita" !!
  39. # 2. You are NOT allowed to repost this script.(or modified versions)
  40. # 3. You are NOT allowed to convert this script.
  41. # 4. You are NOT allowed to use this script for Commercial games.
  42. # 5. ENJOY!
  43. #
  44. # "FINE PRINT"
  45. # By using this script you hereby agree to the above terms and conditions,
  46. # if any violation of the above terms occurs "legal action" may be taken.
  47. # Not understanding the above terms and conditions does NOT mean that
  48. # they do not apply to you.
  49. # If you wish to discuss the terms and conditions in further detail you can
  50. # contact me at http://dekitarpg.wordpress.com/
  51. #
  52. #===============================================================================
  53. # ☆ Instructions
  54. #-------------------------------------------------------------------------------
  55. # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
  56. #
  57. #===============================================================================
  58. # ☆ HELP
  59. #-------------------------------------------------------------------------------
  60. # Heres a list of :key_symbols ( if using my $D13x Core )
  61. #
  62. # Letters
  63. # :A, :B, :C, :D, :E, :F, :G, :H, :I, :J, :K, :L, :M, :N, :O, :P, :Q, :R
  64. # :S, :T, :U, :V, :W, :X, :Y, :Z
  65. # Numbers
  66. # :_1, :_2, :_3, :_4, :_5, :_6, :_7, :_8, :_9, :_0,
  67. # Other
  68. # :SHIFT, :LSHIFT, :RSHIFT, :TAB, :LEFT, :RIGHT, :UP, :DOWN, :PAUSE
  69. #
  70. # To Disable A Key, Make Symbol :NONE,
  71. #
  72. #===============================================================================
  73. module WSAD_Move
  74. #===============================================================================
  75. $D13x[:CORE]?Key=Keys::Key: Key={}# << KEEP
  76.  
  77. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  78. # ☆ Settings
  79. #--------------------------------------------------------------------------
  80. # ALL settings Require my $D13x - Core to take effect !!
  81. Up = Key[ :W ]
  82. Down = Key[ :S ]
  83. Left = Key[ :A ]
  84. Right = Key[ :D ]
  85.  
  86. OverWrite_Sprint_Key = true
  87. Sprint = Key[ :RSHIFT ] #####################
  88. # CUSTOMISATION END #
  89. end #####################
  90. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  91. # #
  92. # http://dekitarpg.wordpress.com/ #
  93. # #
  94. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  95. #===============================================================================#
  96. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  97. # YES?\.\. #
  98. # OMG, REALLY? \| #
  99. # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
  100. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  101. #===============================================================================#
  102. module Input
  103. #===============================================================================
  104. #---------------------------------------------------------------------------
  105. # Dir4 Using $D13x Key Input
  106. #---------------------------------------------------------------------------
  107. def self.dir4
  108. return old_key_WSAD_dir4 unless $D13x[:CORE]
  109. return 2 if Keys.press?(WSAD_Move::Down)
  110. return 4 if Keys.press?(WSAD_Move::Left)
  111. return 6 if Keys.press?(WSAD_Move::Right)
  112. return 8 if Keys.press?(WSAD_Move::Up)
  113. return 0
  114. end
  115. #---------------------------------------------------------------------------
  116. # Dir4 using default Vx Ace Key Input
  117. #---------------------------------------------------------------------------
  118. def self.old_key_WSAD_dir4
  119. return 2 if Input.press?(:Y)
  120. return 4 if Input.press?(:X)
  121. return 6 if Input.press?(:Z)
  122. return 8 if Input.press?(:R)
  123. return 0
  124. end
  125.  
  126. end
  127.  
  128. if WSAD_Move::OverWrite_Sprint_Key
  129. #==============================================================================
  130. class Game_Player < Game_Character
  131. #==============================================================================
  132. #---------------------------------------------------------------------------
  133. # Alias List
  134. #---------------------------------------------------------------------------
  135. alias :new_dash? :dash?
  136. #--------------------------------------------------------------------------
  137. # Determine if Dashing (overwrite)
  138. #--------------------------------------------------------------------------
  139. def dash?
  140. return new_dash? unless $D13x[:CORE]
  141. return false if @move_route_forcing
  142. return false if $game_map.disable_dash?
  143. return false if vehicle
  144. return Keys.press?(WSAD_Move::Sprint)
  145. end
  146.  
  147. end
  148.  
  149. end # << WSAD_Move::OverWrite_Sprint_Key
  150.  
  151. #==============================================================================#
  152. # http://dekitarpg.wordpress.com/ #
  153. #==============================================================================#
  154. end # if false // true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement