Project1

标题: 脚本出错,求助~~~ [打印本页]

作者: zhangfuzhou    时间: 2013-10-12 23:56
标题: 脚本出错,求助~~~

纯脚本制作的窗口角色状态,已添加窗口的刷新脚本,可是不完善,使用事件角色离队后,窗口不刷新,几秒后显示错误 Window_Base474行发生~~~~
RUBY 代码复制
  1. icons = (actor.state_icons + actor.buff_icons)[0, width / 24]

全段是
RUBY 代码复制
  1. #--------------------------------------------------------------------------
  2.   # ● 绘制强化/弱化状态的图标
  3.   #--------------------------------------------------------------------------
  4.   def draw_actor_icons(actor, x, y, width = 96)
  5.     icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
  6.     icons.each_with_index {|n, i| draw_icon(n, x + 24 * i, y) }
  7.   end

不知道什么地方出错了,下面是窗口刷新脚本

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
求巨巨帮忙~~~
作者: zhangfuzhou    时间: 2013-10-13 00:09
这是出错提示~~~





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