No Mouse Dashing

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,145
Reaction score
12,418
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,893
Reaction score
18,469
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
39,145
Reaction score
12,418
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
480
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
39,145
Reaction score
12,418
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
636
Reaction score
206
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
39,145
Reaction score
12,418
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
39,145
Reaction score
12,418
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
39,145
Reaction score
12,418
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

XwwX OMG! Only 4 more weeks till I can leave my crappy job and never ever go back! I am SO freaking excited!!!
Sometimes, it's so hard to resist
"this boss is too easy, what if I add more gimmicks". Then I remember most of my players might be already dying fighting the boss.
You certainly should show love and recognition to teammates who have achieved great success! Congrats Eli!
Just 2 Days of no Internet and I made more Progress in my Game than last 2 Weeks combined. Now I know, Internet makes me a Lazy person.. :D
I'm back to the bugs.
100 bugs in my coding,
take one down,
fix it up,
132 bugs in my coding.

Forum statistics

Threads
98,075
Messages
949,090
Members
129,354
Latest member
mojiijou
Top