No Mouse Dashing

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,969
Reaction score
13,603
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
3,341
Reaction score
21,530
First Language
British 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,969
Reaction score
13,603
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
483
Reaction score
288
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,969
Reaction score
13,603
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
214
Reaction score
220
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
46
Reaction score
28
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
696
Reaction score
214
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,969
Reaction score
13,603
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,969
Reaction score
13,603
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,969
Reaction score
13,603
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.
 

Jami_DC

Villager
Member
Joined
Dec 2, 2018
Messages
9
Reaction score
4
First Language
English
Primarily Uses
RMMV
Holy crap this plugin helps me so much. It is EXACTLY what I wanted. It not only disables the 'forced' Dash option of Mouse Movement but you can STILL hold Shift to Dash 'during' Mouse movement. It also IS affected by Dash settings being ON or OFF so you basically have the exact same settings for Keyboard movement and Mouse movement. Thank you!
 

cacarama

Warper
Member
Joined
Dec 28, 2014
Messages
1
Reaction score
1
First Language
Portuguese
Primarily Uses
Thank you!
It also works on MZ!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I thought too much about improve mechanic while forget that I actually just want focus on a simple story.
Is there anyone who would like to resize some of sprites I've got and put them into MV sheet? I'm bad at that kind of things. I want to make a game, but I lack in resources and I'm bad at recolouring them, so my only option was to use a sprite maker from one game (Ive got permission to use it) but these are sprites from VX Ace and I only have MV. So, is there anyone interested in helping me?
Wow! This game looks great! Streaming now :D
Working on a system that allows you to define events in an easy to use text file format!!! Would you use such a thing? 0o

Forum statistics

Threads
104,483
Messages
1,006,627
Members
135,988
Latest member
Hypermear
Top