/*:
/*:
* @target MZ
* @plugindesc Check Player/Event Touch triggers when player completes a jump.
* @author Canned_Dinosaur
* @url https://forums.rpgmakerweb.com/threads/175661/
* @help This plugin changes the behavior of events with priority below player,
* plus either event touch or player touch trigger. The events will now also
* trigger when the player jumps on them.
* Free to use and/or modify for any project, no credit required.
*/
void (alias => {
Game_Player.prototype.updateJump = function() {
alias.apply(this, arguments);
// If the jump just ended and player can start events...
if (this._jumpCount === 0 && this.canStartLocalEvents()) {
// ...look at all the events below the player and start them.
for (const event of $gameMap.eventsXy($gamePlayer.x, $gamePlayer.y)) {
if (event.isTriggerIn([1,2]) && event._priorityType === 0) event.start()
}
}
};
})(Game_Player.prototype.updateJump);