加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
纯脚本制作的窗口角色状态,已添加窗口的刷新脚本,可是不完善,使用事件角色离队后,窗口不刷新,几秒后显示错误 Window_Base474行发生~~~~
icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
全段是
#-------------------------------------------------------------------------- # ● 绘制强化/弱化状态的图标 #-------------------------------------------------------------------------- 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
#--------------------------------------------------------------------------
# ● 绘制强化/弱化状态的图标
#--------------------------------------------------------------------------
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
不知道什么地方出错了,下面是窗口刷新脚本
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
求巨巨帮忙~~~ |