#==============================================================================| # ** Script Info | #------------------------------------------------------------------------------| # * Script Name | # DoubleX RMVXA Diagonal Movement | #------------------------------------------------------------------------------| # * Functions | # Lets users moves characters diagonally by pressing both component keys | #------------------------------------------------------------------------------| # * Terms Of Use | # You shall keep this script's Script Info part's contents intact | # You shalln't claim that this script is written by anyone other than | # DoubleX or his aliases | # None of the above applies to DoubleX or his aliases | #------------------------------------------------------------------------------| # * Prerequisites | # Abilities: | # Nothing special | #------------------------------------------------------------------------------| # * Instructions | # 1. Open the script editor and put this script into an open slot between | # Materials and Main, save to take effect. | #------------------------------------------------------------------------------| # * Links | # Script Usage 101: | # 1. forums.rpgmakerweb.com/index.php?/topic/32752-rmvxa-script-usage-101/ | # 2. rpgmakervxace.net/topic/27475-rmvxa-script-usage-101/ | # This script: | # 1. [url]http://pastebin.com/dySk8jkU[/url] | # Mentioned Patreon Supporters: | # [url]https://www.patreon.com/posts/71738797[/url] | #------------------------------------------------------------------------------| # * Authors | # DoubleX | #------------------------------------------------------------------------------| # * Changelog | # v1.00a(GMT 0600 15-8-2015): | # 1. 1st version of this script finished | #==============================================================================| ($doublex_rmvxa ||= {})[:Diagonal_Movement] = "v1.00a" #==============================================================================| # ** Script Implementations | # You need not edit this part as it's about how this script works | #------------------------------------------------------------------------------| # * Script Support Info: | # 1. Prerequisites | # - Basic knowledge of pixel movement | # - Some RGSS3 scripting proficiency to fully comprehend this script | # 2. Method documentation | # - The 1st part describes why this method's rewritten/aliased for | # rewritten/aliased methods or what the method does for new methods | # - The 2nd part describes what the arguments of the method are | # - The 3rd part informs which version rewritten, aliased or created this| # method | # - The 4th part informs whether the method's rewritten or new | # - The 5th part describes how this method works for new methods only, | # and describes the parts added, removed or rewritten for rewritten or | # aliased methods only | # Example: | # #--------------------------------------------------------------------------| | # # Why rewrite/alias/What this method does | | # #--------------------------------------------------------------------------| | # # *argv: What these variables are | # # &argb: What this block is | # def def_name(*argv, &argb) # Version X+; Rewrite/New | # # Added/Removed/Rewritten to do something/How this method works | # def_name_code | # # | # end # def_name | #------------------------------------------------------------------------------| class Game_Player < Game_Character # Edit def move_by_input # Rewrite # Rewritten return if !movable? || $game_map.interpreter.running? || Input.dir4 == 0 return move_straight(Input.dir4) if Input.dir8 % 2 == 0 case Input.dir8 when 1 move_diagonal(4, 2) when 3 move_diagonal(6, 2) when 7 move_diagonal(4, 8) when 9 move_diagonal(6, 8) end check_event_trigger_touch_front # end # move_by_input end # Game_Player #------------------------------------------------------------------------------| #==============================================================================|