| 赞 | 72 |
| VIP | |
| 好人卡 | |
| 积分 | 23 |
| 经验 | |
| 最后登录 | 2022-3-9 |
| 在线时间 | 4033 小时 |
…あたしは天
- 梦石
- 0
- 星屑
- 2308
- 在线时间
- 4033 小时
- 注册时间
- 2010-10-4
- 回帖
- 10548
 
|
发表于 2015-10-25 20:44:54
|
显示全部楼层
本帖最后由 taroxd 于 2015-10-25 21:00 编辑
console.log 原来是异步的,怪不得 console.log(this); 发现 _eventId 是 0
[pre lang="javascript"]console.log(this.eventId());[/pre]
以下为谜之 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;
- };
- })();
复制代码 |
|