Double Tap Dash

Status
Not open for further replies.

Mr. Minister

You can call me Mister ;)
Veteran
Joined
Mar 14, 2012
Messages
33
Reaction score
2
First Language
English
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
4,709
Reaction score
5,389
First Language
Indonesian
Primarily Uses
RMVXA
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

You can call me Mister ;)
Veteran
Joined
Mar 14, 2012
Messages
33
Reaction score
2
First Language
English
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
4,709
Reaction score
5,389
First Language
Indonesian
Primarily Uses
RMVXA
No problem. And thanks for the idea :D
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

palatkorn wrote on Kes's profile.
Hello i have a question Regarding the topic of games in my development, is there anything that I can't post yet?

"Your service has been identified as part of an outage. This is expected to be restored by 7pm IN SEVEN DAYS!!!" Guess I won't be around as much over the next week :(
Ami
tethering is my lifesaver,especially when computer or laptop doesn't support internet connection.
convention concluded, i'm glad the books well received and sold out
not every content is decent, but i'll be better for the next work.

now back to game developing
I hope to be able to post my vxace resource edits this Wednesday.
Not sure if I'll get to the library though.

Forum statistics

Threads
94,464
Messages
921,114
Members
124,293
Latest member
ravichah
Top