| 
 
| 赞 | 36 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 96 |  
| 经验 | 0 |  
| 最后登录 | 2025-10-26 |  
| 在线时间 | 462 小时 |  
 Lv4.逐梦者 
	梦石2 星屑7638 在线时间462 小时注册时间2021-12-4帖子492 
 | 
| Game_Map.prototype.requestRefresh = function() { this._needsRefresh = true;
 };
 官方的所有事件页都是通过这个函数来刷新的(比如改变行走图),这个函数会在【开关/变量/独立开关/队员组成/道具数量】变化时自动执行。
 既然公共事件的自动触发只能用开关而不能用变量,那我们可以在这个函数里判断变量并且根据变量去捆绑性地修改开关,比如这样:
 Game_Map.prototype.requestRefresh = function() {
 if ($gameVariables.value(114) >= 514) $gameSwitches._data[810] = true; // 当114号变量的值大于等于514时,同步自动开启810号开关。
 this._needsRefresh = true;
 };
 那么你就可以把公共事件的条件设为810号开关,但实际上通过114号变量去触发了。
 | 
 |