查看: 2159|回复: 1

[已经过期] 脚本出错,求助~~~

[复制链接]
梦石
0
星屑
50
在线时间
34 小时
注册时间
2013-10-10
回帖
9
发表于 2013-10-12 23:56:31 | 显示全部楼层 |阅读模式

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

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

×
1.JPG
纯脚本制作的窗口角色状态,已添加窗口的刷新脚本,可是不完善,使用事件角色离队后,窗口不刷新,几秒后显示错误 Window_Base474行发生~~~~
[pre lang="ruby" line="1"]    icons = (actor.state_icons + actor.buff_icons)[0, width / 24][/pre]
全段是
[pre lang="ruby" line="1"]  #--------------------------------------------------------------------------
  # ● 绘制强化/弱化状态的图标
  #--------------------------------------------------------------------------
  def draw_actor_icons(actor, x, y, width = 96)
    icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
    icons.each_with_index {|n, i| draw_icon(n, x + 24 * i, y) }
  end[/pre]
不知道什么地方出错了,下面是窗口刷新脚本

class Game_Actor < Game_Battler
  #----------------------------------------------------------------------------
  # * 重命名方法
  #----------------------------------------------------------------------------
  alias ms_refresh refresh
  alias ms_tp tp=
  alias ms_add_state add_state
  #--------------------------------------------------------------------------
  # * 刷新
  #--------------------------------------------------------------------------
  def refresh
    ms_refresh
    $refresh = true
  end
  #----------------------------------------------------------------------------
  # * 更改 TP
  #----------------------------------------------------------------------------
  def tp=(tp)
    ms_tp(tp)
    $refresh = true
  end
  #----------------------------------------------------------------------------
  # * 附加状态
  #----------------------------------------------------------------------------
  def add_state(state_id)
    ms_add_state(state_id)
    $refresh = true
  end
end

class Game_Party
  #----------------------------------------------------------------------------
  # * 重命名方法
  #----------------------------------------------------------------------------
  alias ms_swap_order swap_order
  #----------------------------------------------------------------------------
  # * 交换顺序
  #----------------------------------------------------------------------------
  def swap_order(index1, index2)
    ms_swap_order(index1, index2)
    $refresh = true
  end
end
求巨巨帮忙~~~
梦石
0
星屑
50
在线时间
34 小时
注册时间
2013-10-10
回帖
9
 楼主| 发表于 2013-10-13 00:09:11 | 显示全部楼层
这是出错提示~~~
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部