查看: 1035|回复: 4

[有事请教] ACE要怎么设置个别角色只能在水上行走,不能在陆地上行走

[复制链接]
梦石
0
星屑
1737
在线时间
123 小时
注册时间
2023-12-26
回帖
184
发表于 2025-3-15 18:09:50 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 djs789783 于 2025-3-15 21:15 编辑

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

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

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

水上行走工程.rar

1.43 MB, 下载次数: 1

梦石
0
星屑
29896
在线时间
5733 小时
注册时间
2016-3-8
回帖
1653
发表于 2025-3-15 18:30:27 | 显示全部楼层
[pre lang="ruby"]# Waterbound 水生事件 1.0 (3/23/15)                     -by avarisc #
# * 为事件添加一个注释 "[waterbound]" (不包括引号)
# 该事件就能在水中行走,且不能在陆地中行走.
# 条款: 公开发布. 尽情使用.
#==============================================================================#
class Game_Event < Game_Character
  def check_waterbound(page)
    command_list = page.list
    (0..command_list.length - 2).each {|k|
      command = command_list[k]
      next if command.code != 108        
      @waterbound = true if command.parameters[0][/waterbound/]
    }
  end
  alias refresh_waterbound_game_character refresh
  def refresh
    refresh_waterbound_game_character
    @waterbound = false
    if @page then check_waterbound(@page) end
  end
end
class Game_CharacterBase
  alias map_passable_waterbound_game_characterbase? :map_passable?
  def map_passable?(x, y, d)
    return $game_map.boat_passable?(x, y) if @waterbound
    return map_passable_waterbound_game_characterbase?(x, y, d)
  end
end[/pre]
回复

使用道具 举报

梦石
0
星屑
1737
在线时间
123 小时
注册时间
2023-12-26
回帖
184
 楼主| 发表于 2025-3-15 21:16:30 | 显示全部楼层
alexncf125 发表于 2025-3-15 18:30
# Waterbound 水生事件 1.0 (3/23/15)                     -by avarisc #
# * 为事件添加一个注释 "[water ...

拜托一下,我放了工程,人物加入,人物不能下水。
回复

使用道具 举报

梦石
0
星屑
29896
在线时间
5733 小时
注册时间
2016-3-8
回帖
1653
发表于 2025-3-16 14:23:28 | 显示全部楼层
djs789783 发表于 2025-3-15 21:16
拜托一下,我放了工程,人物加入,人物不能下水。

水上行走工程.rar (1.42 MB, 下载次数: 4)
回复

使用道具 举报

梦石
0
星屑
1737
在线时间
123 小时
注册时间
2023-12-26
回帖
184
 楼主| 发表于 2025-3-17 01:35:31 | 显示全部楼层

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

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部