Disable mouse movement but still able to click events to trigger them

Hello,

As the title says i'm looking at how i could disable the mouse clicks to stop map movement, but still be able to click events when the player is near them to activate the event.

I know there is a bunch of plugins out there to disable the mouse and i can also edit the rpg_objects to disable it (Which is what i have done for now) but really id like to just disable the map movement but keep the rest of the functionality if possible?

Cheers!
Find this in rpg_scenes and remove the set destination line.
Scene_Map.prototype.processMapTouch = function() {
if (TouchInput.isTriggered() || this._touchCount > 0) {
if (TouchInput.isPressed()) {
if (this._touchCount === 0 || this._touchCount >= 15) {
var x = $gameMap.canvasToMapX(TouchInput.x);
var y = $gameMap.canvasToMapY(TouchInput.y);
$gameTemp.setDestination(x, y);
}
this._touchCount++;
} else {
this._touchCount = 0;
}
}
};
@Poryg Hi! 🙂 Hmm this does stop mouse movement but i cant seem to click on any events to trigger them still 🙁
@Poryg Hi! 🙂 Hmm this does stop mouse movement but i cant seem to click on any events to trigger them still 🙁
the map move are made by the player

PHP:
Game_Player.prototype.update = function(sceneActive) {
    var lastScrolledX = this.scrolledX();
    var lastScrolledY = this.scrolledY();
    var wasMoving = this.isMoving();
    this.updateDashing();
    if (sceneActive) {
        this.moveByInput();
    }
    Game_Character.prototype.update.call(this);
    this.updateScroll(lastScrolledX, lastScrolledY); // DISABLE MAP MOVE 
    this.updateVehicle();
    if (!this.isMoving()) {
        this.updateNonmoving(wasMoving);
    }
    this._followers.update();
};
@Jonforum Hi! Thanks for the input 😀 I gave that a go. I // out line 7674 the one you said disables map movement although i can still use the mouse to move the player.. And it also starts freaking out when i click on event
@Jonforum Hi! Thanks for the input 😀 I gave that a go. I // out line 7674 the one you said disables map movement although i can still use the mouse to move the player.. And it also starts freaking out when i click on event
you will need to make your own system.
The way you want, will need complexe hack if you don't know js and how rmmv core work.
You can try add many console.log and try to understand what you need disable and keep.
I can not check for you because it will take too much time.
Ah i see, that sounds a bit fiddly :/ Ill probably move on for now, i was kinda just seeing if its something that's doable with a small change, guess not. Thanks for the help though appreciate it 🙂

Original thread: https://forums.rpgmakerweb.com/threads/disable-mouse-movement-but-still-able-to-click-events-to-trigger-them.92520/