As it is now, it's possible for certain triggers to be activated when the player is in a square they're not supposed to be in, which screws up the game.
Hmm... I can't replicate what your talking about, for me player touch & below only events only activate when the player steps on them.. which is how it should be
...for me pressing the action button doesn't do anything on the square or on adjacent squares
Can you share screenshots or video?
I don't see anything wrong with the events themselves. Maybe your tileset is the problem? See if the tile you are using is marked as a "counter" in the database. This would explain why you can activate it with the action button.View attachment 251809This is where it's supposed to take place. The invisible trigger is right where I'm standing. But:
View attachment 251810I just activated it from a square away.
View attachment 251811
This is what it looks like in the editor...
View attachment 251812
And this is the event itself.
//=============================
// KTouch4SameXY.js
//=============================
/*:
* @plugindesc Check if current event's coordinates are the same as the player's.
* @author Kyonides Arkanthes
* @help Date: 2023-01-29
* This plugin prevents the Player Touch trigger from executing if the player
* is still 1 tile away from a given event.
*
* Script Calls:
*
* this.SameXYCoords()
* this.NotSameXYCoords()
*/
//=============================
Game_Interpreter.prototype.SameXYCoords = function() {
let eventID = this.eventId();
let event = $gameMap.event(eventID);
return event.x == $gamePlayer.x && event.y == $gamePlayer.y;
};
Game_Interpreter.prototype.NotSameXYCoords = function() {
return !this.SameXYCoords();
};
It works! Thanks! Now to run through every step-on event in the game and add this... but it'll be worth it. ^__^;Warning!
I don't need the following plugin to make it work normally.
Check any nearby events that might be triggering the event at the wrong moment.
I'm not used to depend on eventing to solve issues so I came up with this little fix for your issue.
Please read the instructions to learn about the script calls so you can use them in a conditional branch as a script condition.
JavaScript://============================= // KTouch4SameXY.js //============================= /*: * @plugindesc Check if current event's coordinates are the same as the player's. * @author Kyonides Arkanthes * @help Date: 2023-01-29 * This plugin prevents the Player Touch trigger from executing if the player * is still 1 tile away from a given event. * * Script Calls: * * this.SameXYCoords() * this.NotSameXYCoords() */ //============================= Game_Interpreter.prototype.SameXYCoords = function() { let eventID = this.eventId(); let event = $gameMap.event(eventID); return event.x == $gamePlayer.x && event.y == $gamePlayer.y; }; Game_Interpreter.prototype.NotSameXYCoords = function() { return !this.SameXYCoords(); };