Project1
标题:
怎麼獲得事件ID ?
[打印本页]
作者:
killGOF2
时间:
2015-10-25 18:09
标题:
怎麼獲得事件ID ?
事件Script
alert(Game_Interpreter.prototype.eventId)
ssssss.jpg
(9.96 KB, 下载次数: 19)
下载附件
保存到相册
2015-10-25 18:08 上传
有人可以教學一下嗎 ?
作者:
unowoo
时间:
2015-10-25 19:25
$gameMap.events()可以获得当前地图的所有事件
作者:
喵呜喵5
时间:
2015-10-25 19:43
alert(Game_Interpreter.prototype.eventId())
作者:
killGOF2
时间:
2015-10-25 20:43
本帖最后由 killGOF2 于 2015-10-25 20:44 编辑
試了很久才發現了....
this._mapId
原來在事件Script裡
Game_Interpreter 要加上 this. 才能呼叫(;´Д`)
alert(this._mapId)
作者:
taroxd
时间:
2015-10-25 20:44
本帖最后由 taroxd 于 2015-10-25 21:00 编辑
console.log 原来是异步的,怪不得 console.log(this); 发现 _eventId 是 0
JAVASCRIPT 代码
复制
console.
log
(
this
.
eventId
(
)
)
;
console.
log
(
this
.
eventId
(
)
)
;
以下为谜之 Plugin Command 功能
// Plugin Command: eventID x
// assign eventID to variable x
(function() {
var _pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
_pluginCommand.call(command, args);
if (command === "eventID") {
$gameVariables.setValue(parseInt(args[0]), this.eventId());
}
return true;
};
})();
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1