Project1

标题: ACE要怎么设置个别角色只能在水上行走,不能在陆地上行走 [打印本页]

作者: djs789783    时间: 2025-3-15 18:09
标题: ACE要怎么设置个别角色只能在水上行走,不能在陆地上行走
本帖最后由 djs789783 于 2025-3-15 21:15 编辑

要怎么设置有些角色只能在水上行走,不能在陆地上行走?

ACE要怎么设置个别角色只能在水上行走,不能在陆地上行走

??要怎么弄??谢谢大佬告知下

水上行走工程.rar

1.43 MB, 下载次数: 1


作者: alexncf125    时间: 2025-3-15 18:30
RUBY 代码复制
  1. # Waterbound 水生事件 1.0 (3/23/15)                     -by avarisc #
  2. # * 为事件添加一个注释 "[waterbound]" (不包括引号)
  3. # 该事件就能在水中行走,且不能在陆地中行走.
  4. # 条款: 公开发布. 尽情使用.
  5. #==============================================================================#
  6. class Game_Event < Game_Character
  7.   def check_waterbound(page)
  8.     command_list = page.list
  9.     (0..command_list.length - 2).each {|k|
  10.       command = command_list[k]
  11.       next if command.code != 108        
  12.       @waterbound = true if command.parameters[0][/waterbound/]
  13.     }
  14.   end
  15.   alias refresh_waterbound_game_character refresh
  16.   def refresh
  17.     refresh_waterbound_game_character
  18.     @waterbound = false
  19.     if @page then check_waterbound(@page) end
  20.   end
  21. end
  22. class Game_CharacterBase
  23.   alias map_passable_waterbound_game_characterbase? :map_passable?
  24.   def map_passable?(x, y, d)
  25.     return $game_map.boat_passable?(x, y) if @waterbound
  26.     return map_passable_waterbound_game_characterbase?(x, y, d)
  27.   end
  28. end

作者: djs789783    时间: 2025-3-15 21:16
alexncf125 发表于 2025-3-15 18:30
# Waterbound 水生事件 1.0 (3/23/15)                     -by avarisc #
# * 为事件添加一个注释 "[water ...

拜托一下,我放了工程,人物加入,人物不能下水。
作者: alexncf125    时间: 2025-3-16 14:23
djs789783 发表于 2025-3-15 21:16
拜托一下,我放了工程,人物加入,人物不能下水。

水上行走工程.rar (1.42 MB, 下载次数: 2)
作者: djs789783    时间: 2025-3-17 01:35
alexncf125 发表于 2025-3-16 14:23

能变成一种状态使用吗?我想设置加入的伙伴可以在水上行走的,
但是这个注释不能在伙伴或职业备注里写注释waterbound。干脆改成状态变为物品好了。
这样一来只要使用物品,全体人员都可以在水上行走了。




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1