赞 | 0 |
VIP | 4 |
好人卡 | 0 |
积分 | 2 |
经验 | 31715 |
最后登录 | 2021-9-11 |
在线时间 | 829 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 180
- 在线时间
- 829 小时
- 注册时间
- 2010-6-26
- 帖子
- 671
|
- #--------------------------------------------------------------------------
- # ● 确认前方事件是否被触发
- # triggers : 触发数组
- #--------------------------------------------------------------------------
- def check_event_trigger_there(triggers)
- return false if $game_map.interpreter.running?
- result = false
- front_x = $game_map.x_with_direction(@x, @direction)
- front_y = $game_map.y_with_direction(@y, @direction)
- for event in $game_map.events_xy(front_x, front_y)
- if triggers.include?(event.trigger) and event.priority_type == 1
- event.start
- result = true
- end
- end
- if result == false and $game_map.counter?(front_x, front_y)
- front_x = $game_map.x_with_direction(front_x, @direction)
- front_y = $game_map.y_with_direction(front_y, @direction)
- for event in $game_map.events_xy(front_x, front_y)
- if triggers.include?(event.trigger) and event.priority_type == 1
- event.start
- result = true
- end
- end
- end
- return result
- end
复制代码 这段脚本可能有用,阁下可以思考思考…… |
|