| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2022-12-9 |
| 在线时间 | 5 小时 |
- 梦石
- 0
- 星屑
- 70
- 在线时间
- 5 小时
- 注册时间
- 2022-10-30
- 回帖
- 4
|
发表于 2022-10-30 16:04:50
|
显示全部楼层
=begin
不知为什么在Game_Interpreter外调用$data_common_events无法索引取值
给Game_Interpreter添加根据$game_variables[2]的值调用相应id的公共事件的方法
在需要调用公共事件的地方输入脚本do_common_event即可
=end
class Game_Interpreter
def do_common_event
common_event=$data_common_events[$game_variables[2]]
if common_event
child = Game_Interpreter.new(@depth + 1)
child.setup(common_event.list, same_map? ? @event_id : 0)
child.run
end
end
end |
|