KTouchNewMapEvent MV
KTouchNewMapEvent MVby 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!
本贴来自国际rpgmaker官方论坛作者:kyonides处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/ktouchnewmapevent-mv.154522/
页:
[1]