Is there a way I can change the left mouse button so it doesn't activate events but still activates the pathfinder and preferably, if possible, function as "ok" in menus only? I've looked in rpg_core but can't make sense of how the mouse works.
[SOLVED] Disable mouse event activation
● ARCHIVED · READ-ONLY
-
-
Code:
Game_Player.prototype.triggerTouchActionD1 = function(x1, y1) { if ($gameMap.airship().pos(x1, y1)) { if (TouchInput.isTriggered() && this.getOnOffVehicle()) { return true; } } this.checkEventTriggerHere([0]); return $gameMap.setupStartingEvent(); }; Game_Player.prototype.triggerTouchActionD2 = function(x2, y2) { if ($gameMap.boat().pos(x2, y2) || $gameMap.ship().pos(x2, y2)) { if (TouchInput.isTriggered() && this.getOnVehicle()) { return true; } } if (this.isInBoat() || this.isInShip()) { if (TouchInput.isTriggered() && this.getOffVehicle()) { return true; } } this.checkEventTriggerThere([0,1,2]); return $gameMap.setupStartingEvent(); Game_Player.prototype.triggerTouchActionD3 = function(x2, y2) { if ($gameMap.isCounter(x2, y2)) { this.checkEventTriggerThere([0,1,2]); } return $gameMap.setupStartingEvent(); }; };
I think you need to find these three functions inside rpg_objects and delete the return $gameMap.setupStartingEvent from all of them. -
Thank you Poryg! Although that wasn't the solution, using that information I tracked down this part
Code:Game_Player.prototype.triggerTouchAction = function() { if ($gameTemp.isDestinationValid()){ var direction = this.direction(); var x1 = this.x; var y1 = this.y; var x2 = $gameMap.roundXWithDirection(x1, direction); var y2 = $gameMap.roundYWithDirection(y1, direction); var x3 = $gameMap.roundXWithDirection(x2, direction); var y3 = $gameMap.roundYWithDirection(y2, direction); var destX = $gameTemp.destinationX(); var destY = $gameTemp.destinationY(); if (destX === x1 && destY === y1) { return this.triggerTouchActionD1(x1, y1); } else if (destX === x2 && destY === y2) { return this.triggerTouchActionD2(x2, y2); } else if (destX === x3 && destY === y3) { return this.triggerTouchActionD3(x2, y2); } } return false; };
And removed this from it:
Code:if (destX === x1 && destY === y1) { return this.triggerTouchActionD1(x1, y1); } else if (destX === x2 && destY === y2) { return this.triggerTouchActionD2(x2, y2); } else if (destX === x3 && destY === y3) { return this.triggerTouchActionD3(x2, y2); }
And now the mouse doesn't start events any more, superb!