Status
Not open for further replies.

Mr. Minister

Veteran
Veteran
Joined
Mar 14, 2012
Messages
33
Reaction score
2
First Language
English
Primarily Uses
RMMV
I've done quite a bit of searching and was a little surprised not to be able to find a script like this already...

I would like to use the shift key for other purposes, but I still want to be able to dash without having to introduce any additional keys that aren't used by default (even if I decide not to use the shift key for anything, I'd still rather use the following method for dashing.)

I would like to make dashing possible by double-tapping the arrow key in the direction you want to dash. Releasing an arrow key would end the dash, but quickly pressing another direction while dashing should not interrupt the increase in speed. It would also be nice if it were compatible with other diagonal movement scripts.

I'm not sure how difficult an undertaking this would be, but I would be eternally grateful to whoever might be able to complete a script like this. I'm sure others would put an amazing script like this to good use as well!

Thank you!
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,849
Reaction score
9,243
First Language
Indonesian
Primarily Uses
N/A
Whoa, Nice idea ~

Just a quick script.

DashDelay_Duration = 60 # Set delay duration here (60 = one second)class Game_Player < Game_Character alias theo_double_tap_init initialize def initialize theo_double_tap_init init_tap_dash_member end def init_tap_dash_member @pending_dash = 0 @pending_dash2 = 0 @dash_delay = 0 @dashing = false end alias theo_double_tap_update update def update theo_double_tap_update update_tap_dash end def update_tap_dash if !dash? @dash_delay = [@dash_delay - 1,0].max end if (Input.dir4 == 0 && @dashing) || @dash_delay == 0 init_tap_dash_member end if input_arrow? && !dash_impossible? && !dash? if @pending_dash == Input.dir4 @pending_dash2 = Input.dir4 @dashing = true else @pending_dash = Input.dir4 @dash_delay = DashDelay_Duration end end end def dash_impossible? return @move_route_forcing || $game_map.disable_dash? || vehicle end def input_arrow? [:UP,:DOWN,:LEFT,:RIGHT].any? {|key| Input.trigger?(key)} end def dash? return false if @move_route_forcing return false if $game_map.disable_dash? return false if vehicle return Input.dir4 != 0 && tap_dash? end def tap_dash? (@pending_dash2 == @pending_dash) && @pending_dash2 != 0 end endHope it helps

I'm not sure about the compatibility

Edit :

If you want to credit me, put TheoAllen in your credit list
 
Last edited by a moderator:

Mr. Minister

Veteran
Veteran
Joined
Mar 14, 2012
Messages
33
Reaction score
2
First Language
English
Primarily Uses
RMMV
You are amazing! I've tested it with JV's 8 Directional Movement script and there doesn't seem to be a problem! This is exactly what I needed! Thank you so much!
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,849
Reaction score
9,243
First Language
Indonesian
Primarily Uses
N/A
No problem. And thanks for the idea :D
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Voice.gif
The Voice... They usually show up to talk to you about leaving your mark on the world, which is one of the major themes of my game... How will you be remembered by society.
The only time my brother shows me any kind of support is by liking or LOL my Facebook Comments.
I finally finished the Coliseum for my game. Love how it looks. Credits for the assets goes to Kokoro Reflections, @Starbird_Resources, and @megumi014.
Colossuem.png
Mimics! Mimics everywhere!

Forum statistics

Threads
124,514
Messages
1,164,171
Members
163,350
Latest member
Chrisanity1
Top