KTouchNewMapEvent MV
by Kyonides Arkanthes
by Kyonides Arkanthes
Introduction
Normally, the default plugins would only activate the event after you move in any direction and touch any given event.
This plugin will let you run that event set to run on Player Touch or Event Touch right after being transferred to a new map.
JavaScript:
//==================================
// * KTouchNewMapEventMV.js
//==================================
/*:
* @plugindesc This plugin will be triggered if any given event's coordinates
* match the player's and its trigger is either a Player or Event Touch.
* @author Kyonides Arkanthes
* @help Date: 2023-01-29
*
*/
const KTouchNewMap_event_setupPage = Game_Event.prototype.setupPage;
Game_Player.prototype.newMapX = function() {
return this._newX;
}
Game_Player.prototype.newMapY = function() {
return this._newY;
}
Game_Event.prototype.setupPage = function() {
KTouchNewMap_event_setupPage.call(this);
this.checkEventTriggerNewMapTouch();
};
Game_Event.prototype.checkEventTriggerNewMapTouch = function() {
if (this._trigger == 1 || this._trigger == 2) {
if ($gamePlayer.newMapX() == this.x && $gamePlayer.newMapY() == this.y) {
this.start();
}
}
};
Terms & Conditions
Free as in beer.
Include my nickname in your game credits.
Do not repost it!