【汉化】【含MV】靠近事件时出现提示气泡
原地址: Event Interaction Hint | RPG Maker Forums (rpgmakerweb.com)作者:Dustb0
预览:
汉化脚本:
/*:
* @plugindesc 靠近事件时展示气泡动画
* 汉化 by 烁灵 更多插件请访问 www.hknmtt.com
* @author Dustb0
* @version 1.2
*
* @param balloonID
* @text 气泡 ID
* @type number
* @default 11
*
* @help
* 使用方法:
* 在事件备注区填写
* <interact>
* 即可
*
* 如果只想在指定事件页产生气泡,则在事件指令的第一行使用“注释”:
* \interact
* 在注释中可以指定气泡ID:
* \interact
* 也可以仅在指定方向上应用气泡效果:
* \interact
* (8 = 上, 6 = 右, 2 = 下, 4 = 左)
*
*/
(() => {
const parameters = PluginManager.parameters("SDE_InteractPop");
const paramBalloonID = Number(parameters["balloonID"])
Game_Player.prototype.startMapEvent = function(x, y, triggers, normal) {
if (!$gameMap.isEventRunning()) {
for (const event of $gameMap.eventsXy(x, y)) {
if (
event.isTriggerIn(triggers) &&
event.isNormalPriority() === normal
) {
event.start();
} else if (event.page() &&
event.list().length > 0 &&
event.list().code === 108 &&
event.list().parameters.match(/\\interact\s*/i)) {
// Event Page Comment
// Check direction condition
const direction = event.list().parameters.match(/dir\=(\d)\D*\s*/i);
if (direction && Number(direction) !== $gamePlayer.direction()) {
return;
}
let balloon = event.list().parameters.match(/balloon\=(\d+)\D*\s*/i);
requestBalloon(balloon ? Number(balloon) : paramBalloonID);
} else if (event.event().meta["interact"] && event.findProperPageIndex() >= 0) {
// Event
let balloonID = paramBalloonID
// Check if default param gets overriden by event
if (typeof event.event().meta["interact"] === 'string') {
balloonID = Number(event.event().meta["interact"]);
}
requestBalloon(balloonID);
}
}
}
}
requestBalloon = function(balloonID) {
if ($gamePlayer.requestBalloon) {
$gamePlayer.requestBalloon(balloonID); // MV
} else {
$gameTemp.requestBalloon($gamePlayer, balloonID); // MZ
}
}
})();
页:
[1]