设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1387|回复: 4
打印 上一主题 下一主题

关于66整合脚本增加存档脚本卡死的情况

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-11
帖子
104
跳转到指定楼层
1
发表于 2007-7-17 04:31:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-11
帖子
104
2
 楼主| 发表于 2007-7-17 04:31:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽

Lv2.观梦者

梦石
0
星屑
431
在线时间
125 小时
注册时间
2006-11-2
帖子
1200
3
发表于 2007-7-17 05:00:51 | 只看该作者
缺少参数的脚本冲突 自己整合或者放弃一个。
和记忆一起封存着的ID...
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2007-7-11
帖子
104
4
 楼主| 发表于 2007-7-17 05:51:49 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
8435
在线时间
441 小时
注册时间
2006-7-2
帖子
1432
5
发表于 2007-7-17 07:55:10 | 只看该作者
换一个吧,我用的是这个,没有冲突的

增加存档数量

#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================

# --------------------------------------------------------------------
# 本脚本来自www.66rpg.com,转载自www.phylomortis.com,转载请保留此信息
# --------------------------------------------------------------------
class Scene_File
  #——最大存档数量,一般我认为最多50足够了,20比较合适
  SAVEFILE_MAX = 50
  # -------------------
  def initialize(help_text)
    @help_text = help_text
  end
  # -------------------
  def main
    @help_window = Window_Help.new
    @help_window.set_text(@help_text)
    @savefile_windows = []
    @cursor_displace = 0
    for i in 0..3
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i), i))
    end
    @file_index = 0
    @savefile_windows[@file_index].selected = true
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    Graphics.freeze
    @help_window.dispose
    for i in @savefile_windows
      i.dispose
    end
  end
  # -------------------
  def update
    @help_window.update
    for i in @savefile_windows
      i.update
    end
    if Input.trigger?(Input::C)
      on_decision(make_filename(@file_index))
      $game_temp.last_file_index = @file_index
      return
    end
    if Input.trigger?(Input::B)
      on_cancel
      return
    end
    if Input.repeat?(Input::DOWN)
      if Input.trigger?(Input::DOWN) or @file_index < SAVEFILE_MAX - 1
        if @file_index == SAVEFILE_MAX - 1
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        @cursor_displace += 1
        if @cursor_displace == 4
          @cursor_displace = 3
          for i in @savefile_windows
            i.dispose
          end
          @savefile_windows = []
          for i in 0..3
            f = i - 2 + @file_index
            name = make_filename(f)
            @savefile_windows.push(Window_SaveFile.new(f, name, i))
            @savefile_windows.selected = false
          end
        end
        $game_system.se_play($data_system.cursor_se)
        @file_index = (@file_index + 1)
        if @file_index == SAVEFILE_MAX
          @file_index = SAVEFILE_MAX - 1
        end
        for i in 0..3
          @savefile_windows.selected = false
        end
        @savefile_windows[@cursor_displace].selected = true
        return
      end
    end
    if Input.repeat?(Input::UP)
      if Input.trigger?(Input::UP) or @file_index > 0
        if @file_index == 0
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        @cursor_displace -= 1
        if @cursor_displace == -1
          @cursor_displace = 0
          for i in @savefile_windows
            i.dispose
          end
          @savefile_windows = []
          for i in 0..3
            f = i - 1 + @file_index
            name = make_filename(f)
            @savefile_windows.push(Window_SaveFile.new(f, name, i))
            @savefile_windows.selected = false
          end
        end
        $game_system.se_play($data_system.cursor_se)
        @file_index = (@file_index - 1)
        if @file_index == -1
          @file_index = 0
        end
        for i in 0..3
          @savefile_windows.selected = false
        end
        @savefile_windows[@cursor_displace].selected = true
        return
      end
    end
  end
  # -------------------
  def make_filename(file_index)
    return "save/Save#{file_index + 1}.rxdata"
  end
  # -------------------
end




class Window_SaveFile < Window_Base
  # -------------------
  def initialize(file_index, filename, position)
    y = 64 + position * 104
    super(0, y, 640, 104)
    self.contents = Bitmap.new(width - 32, height - 32)
    @file_index = file_index
    @filename = "save/Save#{@file_index + 1}.rxdata"
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end
    refresh
    @selected = false
  end
end


#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
http://rpg.blue/forumTopicRead.asp?id=121134
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-9-22 09:52

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表