设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2417|回复: 8
打印 上一主题 下一主题

[已经解决] 请问关于事件接触的疑问

[复制链接]

Lv4.逐梦者

梦石
1
星屑
14522
在线时间
2088 小时
注册时间
2017-9-28
帖子
662
1
发表于 2019-5-7 01:49:53 | 显示全部楼层
签名档


  1. =begin
  2. #===============================================================================
  3. Title: 移动路线触发
  4. Author: Hime
  5. Date: Nov 17, 2013
  6. --------------------------------------------------------------------------------
  7. ** Change log
  8. Nov 17, 2013
  9.    - Initial release
  10. --------------------------------------------------------------------------------   
  11. ** Terms of Use
  12. * Free to use in non-commercial projects
  13. * Contact me for commercial use
  14. * No real support. The script is provided as-is
  15. * Will do bug fixes, but no compatibility patches
  16. * Features may be requested but no guarantees, especially if it is non-trivial
  17. * Credits to Hime Works in your project
  18. * Preserve this header
  19. --------------------------------------------------------------------------------
  20. ** 说明

  21. 可以让事件在移动时,如果触发条件是“玩家接触”或“事件接触”,并且成功接触时,
  22. 让事件被触发。默认下,事件移动时是不会触发的。

  23. --------------------------------------------------------------------------------
  24. ** Installation

  25. Place this script below Materials and above Main

  26. --------------------------------------------------------------------------------
  27. ** 使用方法

  28. 即插即用

  29. #===============================================================================
  30. =end
  31. $imported = {} if $imported.nil?
  32. $imported["TH_MoveRouteTriggering"] = true
  33. #===============================================================================
  34. # ** Rest of Script
  35. #===============================================================================
  36. class Game_Character < Game_CharacterBase
  37.   alias :th_move_route_triggering_update_routine_move :update_routine_move
  38.   def update_routine_move
  39.     th_move_route_triggering_update_routine_move
  40.     check_event_trigger_touch_front
  41.   end
  42. end

  43. class Game_Player < Game_Character
  44.   
  45.   alias :th_move_route_triggering_start_map_event :start_map_event
  46.   def start_map_event(x, y, triggers, normal)
  47.     if @move_route_forcing
  48.       $game_map.events_xy(x, y).each do |event|
  49.         if event.trigger_in?(triggers) && event.normal_priority? == normal
  50.           event.start
  51.         end
  52.       end
  53.     else
  54.       th_move_route_triggering_start_map_event(x, y, triggers, normal)
  55.     end
  56.   end
  57. end

  58. class Game_Event < Game_Character
  59.   
  60.   alias :th_move_route_triggering_check_event_trigger_touch :check_event_trigger_touch
  61.   def check_event_trigger_touch(x, y)
  62.     if @move_route_forcing
  63.       if @trigger == 2 && $game_player.pos?(x, y)
  64.         start if !jumping? && normal_priority?
  65.       end
  66.     else
  67.       th_move_route_triggering_check_event_trigger_touch(x, y)
  68.     end
  69.   end
  70. end
复制代码

点评

机器猫的百宝箱!( ⚆ _ ⚆ )  发表于 2019-5-7 15:01
VA外站脚本汉化群:226308173   |    部分远古文件备份:https://wwzv.lanzoue.com/b02rac5pc  密码:acgm
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-15 19:58

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表