赞 | 273 |
VIP | 0 |
好人卡 | 0 |
积分 | 155 |
经验 | 515 |
最后登录 | 2024-5-15 |
在线时间 | 2088 小时 |
Lv4.逐梦者
- 梦石
- 1
- 星屑
- 14522
- 在线时间
- 2088 小时
- 注册时间
- 2017-9-28
- 帖子
- 662
|
签名档
- =begin
- #===============================================================================
- Title: 移动路线触发
- Author: Hime
- Date: Nov 17, 2013
- --------------------------------------------------------------------------------
- ** Change log
- Nov 17, 2013
- - Initial release
- --------------------------------------------------------------------------------
- ** Terms of Use
- * Free to use in non-commercial projects
- * Contact me for commercial use
- * No real support. The script is provided as-is
- * Will do bug fixes, but no compatibility patches
- * Features may be requested but no guarantees, especially if it is non-trivial
- * Credits to Hime Works in your project
- * Preserve this header
- --------------------------------------------------------------------------------
- ** 说明
-
- 可以让事件在移动时,如果触发条件是“玩家接触”或“事件接触”,并且成功接触时,
- 让事件被触发。默认下,事件移动时是不会触发的。
- --------------------------------------------------------------------------------
- ** Installation
-
- Place this script below Materials and above Main
- --------------------------------------------------------------------------------
- ** 使用方法
-
- 即插即用
-
- #===============================================================================
- =end
- $imported = {} if $imported.nil?
- $imported["TH_MoveRouteTriggering"] = true
- #===============================================================================
- # ** Rest of Script
- #===============================================================================
- class Game_Character < Game_CharacterBase
- alias :th_move_route_triggering_update_routine_move :update_routine_move
- def update_routine_move
- th_move_route_triggering_update_routine_move
- check_event_trigger_touch_front
- end
- end
- class Game_Player < Game_Character
-
- alias :th_move_route_triggering_start_map_event :start_map_event
- def start_map_event(x, y, triggers, normal)
- if @move_route_forcing
- $game_map.events_xy(x, y).each do |event|
- if event.trigger_in?(triggers) && event.normal_priority? == normal
- event.start
- end
- end
- else
- th_move_route_triggering_start_map_event(x, y, triggers, normal)
- end
- end
- end
- class Game_Event < Game_Character
-
- alias :th_move_route_triggering_check_event_trigger_touch :check_event_trigger_touch
- def check_event_trigger_touch(x, y)
- if @move_route_forcing
- if @trigger == 2 && $game_player.pos?(x, y)
- start if !jumping? && normal_priority?
- end
- else
- th_move_route_triggering_check_event_trigger_touch(x, y)
- end
- end
- end
复制代码 |
|