| 
 
| 赞 | 0 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 1 |  
| 经验 | 8533 |  
| 最后登录 | 2017-7-6 |  
| 在线时间 | 125 小时 |  
 Lv1.梦旅人 
	梦石0 星屑50 在线时间125 小时注册时间2006-7-19帖子336 | 
| 就是这个脚本,两个使用不同的开关和不同的变量。但如果只插入一个的话,就不会出错,我插入了两个的话,提示第53行出错,是怎么回事?需要怎么修改其中一个脚本呢?复制代码#------------------------------------------------------------------------
#      本脚本来自于66RPG  转载请著名  非法用户【编写】
#------------------------------------------------------------------------
  # 设定要显示的变量号
  $variables_id = 6
  $v_id = 1
  # 设置图标显示号
  $icon_index = 137
#------------------------------------------------------------------------
# 新建窗口
class Window_Variables < Window_Base
  # 初始化
  def initialize
    # 创建大小
    super(416,360,128,56)
    # 获取图标编号
    @icon = 0
    # 获取变量编号
    @variable = 0
    @v = 0
    # 刷新
    refresh
  # 初始化结束
  end
  # 刷新
  def refresh
    # 在图表与变量都有变化的情况下
    if @icon != $icon_index or @variable != $game_variables[$variables_id] or @v !=$game_variables[$v_id]
      # 清楚内容
      self.contents.clear
      # 描绘图表
      draw_icon($icon_index,4,0,true)
      # 描绘变量,偏右
      self.contents.draw_text(32,0,64,24,$game_variables[$variables_id].to_s,2)
      self.contents.draw_text(0,0,64,24,$game_variables[$v_id].to_s,2)
      # 带入变量
      @icon = $icon_index
      @variable = $game_variables[$variables_id]
      @v = $game_variables[$v_id]
      # if 结束
    end
  # 刷新结束
  end
# class 结束
end
# 地图生成窗口
class Scene_Map < Scene_Base
  # 生成窗口
  alias new_start start
  def start
    new_start
    @varia_window = Window_Variables.new
    if $game_switches[10] == false
@varia_window.visible = false
else
@varia_window.visible = true
end
  end
  # 刷新窗口
  alias new_update update
  def update
    new_update
    @varia_window.refresh
  end
  # 释放窗口
  alias new_terminate terminate
  def terminate
    @varia_window.dispose
    new_terminate
  end
# class 结束
end
 | 
 |