Turning off mouse movement

Hey guys,

Im in a bit of a pinch right now, I wish to disable movement by mouseclick, but not the game not registering the mouseclick. Ive stumbled upon this command while searching: "TouchInput.update = function() {}", but its not perfect, since it also seems to disable TouchInput.isTriggered(), so its not useful for having certain ''click button'' elements ingame.
So my question is: How to get rid of mouse interaction, but not keep the game collecting mouse coordinate data - and not being able to use TouchInput.isTriggered().
Looks like touch-based movement is handled in the moveByInput method of Game_Player (rpg_objects.js, line 7624 in v1.5.2). Maybe try saving this as a .js file and importing it as you would a plugin:
Code:
Game_Player.prototype.moveByInput = function() {
    if (!this.isMoving() && this.canMove()) {
        var direction = this.getInputDirection();
        if (direction > 0) {
            $gameTemp.clearDestination();
//      } else if ($gameTemp.isDestinationValid()){
//         var x = $gameTemp.destinationX();
//         var y = $gameTemp.destinationY();
//         direction = this.findDirectionTo(x, y);
        }
        if (direction > 0) {
            this.executeMove(direction);
        }
    }
};
I saved it as a JS file for you.
Complete credit to @caethyril.
@caethyril That works, thanks! Also theres a slight cosmetic problem - that when i walk with arrows while i hold the mouse button, the player starts to run, and you see this white aura(the one you normally see when you use mouse) at the mouse location, it doesnt seem actually harm the gameplay, but it feels a bit glitchy. Any idea how to fix that?

@Thomas Smith Haha, i know how to make a js, but thanks. I appreciate the thought tho!
Oh, yes, that doesn't look right at all! Had a bit of time to test this properly, and it looks like adding this to the .js file hides the white square thing:
Code:
_Sprite_Destination_createBitmap = Sprite_Destination.prototype.createBitmap;
Sprite_Destination.prototype.createBitmap = function() {
	_Sprite_Destination_createBitmap.call(this);
	this.bitmap = new Bitmap(1, 1);
	this.bitmap.fillAll('black');
};
Don't worry, the sprite uses the Add blendmode, so a black sprite renders as transparent. ^_^

Alternatively, to save you (and Thomas) the effort, see attachment. 🙏

Edit:
Whoops, auto-dash issues, I missed that. 😴 Adding this in seems to fix it if anyone's interested:
Code:
_Game_Player_updateDashing = Game_Player.prototype.updateDashing;
Game_Player.prototype.updateDashing = function() {
	_Game_Player_updateDashing.call(this);
	if (this._dashing && !this.isDashButtonPressed()) this._dashing = false;
};
The attached version should be updated, too! 😂
@caethyril Appreciate the efforts you went through big time! Seems to work flawlessly now - well except for the player running while holding the mouse button, but I dont plan on using the ''build in run system'', so thats no problem. Thanks alot!

Original thread: https://forums.rpgmakerweb.com/threads/turning-off-mouse-movement.94714/