No Mouse Dashing

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,770
Reaction score
12,204
First Language
English
Primarily Uses
RMMV
This is a teeny little script snippet that makes the character walk at a normal speed when you're using the mouse for player movement.

Just copy the text below into a plain text editor and save it in your plugins file with a .js extension. Name doesn't matter. Add to your plugins, and no more fast walking with mouse click.

Code:
(function() {
    Game_Player.prototype.updateDashing = function() {
        if (this.isMoving()) {
            return;
        }
        if (this.canMove() && !this.isInVehicle() && !$gameMap.isDashDisabled()) {
            this._dashing = this.isDashButtonPressed();
        } else {
            this._dashing = false;
        }
    };
})();
Free to use, including commercially
 

The Stranger

The Faceless Friend
Veteran
Joined
Sep 14, 2012
Messages
2,865
Reaction score
18,202
First Language
English
Primarily Uses
RMMV
Thanks for this, @Shaz. I was considering disabling mouse movement entirely because of the weird auto-dash function.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,770
Reaction score
12,204
First Language
English
Primarily Uses
RMMV
It bugged me, but when I had an event following the player and it kept jumping between tiles instead of walking, I knew I had to do something about it. I thought it would be much harder to track down and remove.
 

peq42_

Yeet
Veteran
Joined
Feb 5, 2016
Messages
479
Reaction score
285
First Language
Portuguese(BR)
Primarily Uses
RMMV
thanks @Shaz , but could I ask something?
Is there a way to add the option to run only when double click ?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,770
Reaction score
12,204
First Language
English
Primarily Uses
RMMV
Does MV even have a double-click detection? It's not something I would have time to research and test, as it would make it quite a bit more complicated than it already is. If you can find someone who's willing to do it for you, go for it.
 

McSundae

Veteran
Veteran
Joined
Oct 28, 2015
Messages
213
Reaction score
218
First Language
German
I absolutely love scripts like that - already thought about that annoying feature too :) Anyway I'm happy you already solved it
 

FiercestPixel

Veteran
Veteran
Joined
Jan 28, 2018
Messages
32
Reaction score
6
First Language
English
Primarily Uses
RMMV
Yass! My mobile game is designed around time management... You saved me from making oversized maps/padding due to that stupid point dash bug. Thanks man!
 

JamesRyan

Game Designer
Veteran
Joined
Sep 13, 2014
Messages
601
Reaction score
197
First Language
Vietnamese
Primarily Uses
RMMV
I haven't tried this yet, but will it disable mouse dashing when i toggle dashing "On' in my option? By default, i want to disable mouse dashing, but enable again when "Always Dash" option is activated.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,770
Reaction score
12,204
First Language
English
Primarily Uses
RMMV
It makes the player walk at normal speed when using the mouse. That is all. It has nothing to do with when dashing is enabled/disabled on the map, and nothing to do with options.
 

Tonko

Club penguin pro player
Veteran
Joined
Oct 13, 2017
Messages
81
Reaction score
103
First Language
Spanish
Primarily Uses
RMMV
Hey there!
First of all, thanks for this, I really needed it.
But I'm having a problem;
Now, when I click somewhere I wanna walk, the player turns in that direction, but doesn't move at all.
Is there any fix?
Thanks
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,770
Reaction score
12,204
First Language
English
Primarily Uses
RMMV
Does it work when you use the mouse? If so, it's not an issue with this plugin, but with your tileset passage settings.
 

Tonko

Club penguin pro player
Veteran
Joined
Oct 13, 2017
Messages
81
Reaction score
103
First Language
Spanish
Primarily Uses
RMMV
Does it work when you use the mouse? If so, it's not an issue with this plugin, but with your tileset passage settings.
After some troubleshooting, I realized the following:
  • I can walk and turn perfectly using the arrow keys
  • When I click somewhere in the map, the character will turn in that direction, but won't walk
  • If I click several times on a place, the player will finally move there, but I gotta click like 5 times
  • Disabling your plugin (Turning it off) makes the mouse movement work normally... But of course, the character dashes like racing car, which is what I'm trying to avoid
Also, I think it may be an important detail that I'm doing Parallax Mapping (No tiles), and using YEP Region Restrictions.

Any ideas?

Thank you by the way <3
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,770
Reaction score
12,204
First Language
English
Primarily Uses
RMMV
Create a brand new project and ONLY add my plugin. Does it work on that? If it does, then it's likely some incompatibility between my plugin and another one you have.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

buinguyenhoangtho wrote on fizzly's profile.
Hello @fizzly, i would like to use your asset/ resource for my project ( is maybe commercial ). May i have your permission? Thanks you !
Working on breaking the limits of RPGMaker! :cool:
I have 470+ hours on RMMV but have only made a demo game, is this normal? :kaoswt: (I lose motivation a lot plus I use a 32gb laptop, so..)
I like Iron Maiden.
Benku wrote on Magnus0808's profile.
Hey man you helped me out a long time ago with a plugin i was wondering if you can help me out one more time since its literally the last thing i need help with if not is cool but id figured id ask you one more soild.

Forum statistics

Threads
95,427
Messages
929,082
Members
125,659
Latest member
AphoticAmaranth
Top