我用‘桜雅’的即时横版战斗系统时发现这个范本是以三名同伴为基础设定的,因此战斗时的坐标也是按3个人物定的吧?我设定了四个人物,如果一起出战的话胜利退出后,在遇到第2次战斗时就会显示脚本'fullcbs part-11'的第88行错误:undefined method`-'for nil:NilClass,进脚本后发现88行(红色字)所在的部分如下:
#--------------------------------------------------------------------------
# ● バトル画面 X 座標の取得
#--------------------------------------------------------------------------
def screen_x
# パーティ内の並び順から X 座標を計算して返す
if self.index != nil
if @actor_in_battlefield
$xcam_x = 0 if $xcam_x == nil
return 96 + 32 - @field_x_offset + (@x_pos - $xcam_x) * @zoom
else
return self.index * 160 + 80
end
else
return 0
end
end
#--------------------------------------------------------------------------
# ● バトル画面 Y 座標の取得
#--------------------------------------------------------------------------
def screen_y
if @actor_in_battlefield
$xcam_y = 0 if $xcam_y == nil
return 96 + 32 - @field_x_offset + (@x_pos - $xcam_x) * @zoom
else
return 464
end
end
#--------------------------------------------------------------------------
# ● バトル画面 Z 座標の取得
#--------------------------------------------------------------------------
def screen_z
index = $game_party.actors.reverse.index(self)
return @z_pos + (index == nil ? 0 : index)
end
end