Project1

标题: 关于存档问题 [打印本页]

作者: 然然    时间: 2008-6-23 00:09
提示: 作者被禁止或删除 内容自动屏蔽
作者: hitlerson    时间: 2008-6-23 00:25
Scene_Save和Scene_Load也要用他的那个,估计原来的范例里有的吧
作者: 然然    时间: 2008-6-23 00:58
提示: 作者被禁止或删除 内容自动屏蔽
作者: hitlerson    时间: 2008-6-23 01:00
先在用原来那个的基础上再改吧,不然,除非,你会改那个存档的

如果用默认的,请把那个Scene_File 用默认的那个
作者: dbshy    时间: 2008-6-23 01:45
def update
    @command_window.update   
    if @command_window.index != @content_window.index
      @content_window.index = @command_window.index
      @content_window.refresh
    end   
    #——————下面这一部分是原装脚本——————#
    if Input.trigger?(Input::B)  
      $game_system.se_play($data_system.cancel_se)
      if $game_temp.save_calling
        $game_temp.save_calling = false
        $scene = Scene_Map.new
        return
      end
    if $t then
     $scene = Scene_Title.new
     $t = false
   else
   $scene = Scene_Menu.new(5)
   end
    end   
    #———————————————————————#   
    if Input.trigger?(Input::C)
      # 演奏存档 SE
      $game_system.se_play($data_system.cancel_se)
      # 写入存档数据
#==================================================================
      file = File.open(BBS_66RPG_DIR+"Save#{@command_window.index}.rxdata", "wb")
      write_save_data(file)
      if FileTest.exist?(BBS_66RPG_DIR+"shot.jpg")
        File.rename(BBS_66RPG_DIR+"shot.jpg", BBS_66RPG_DIR+"Save#{@command_window.index}.jpg")
#==================================================================
   end
      file.close
      $game_temp.last_file_index = @command_window.index
      # 如果被事件调用
      if $game_temp.save_calling
        # 清除存档调用标志
        $game_temp.save_calling = false
        # 切换到地图画面
        $scene = Scene_Map.new
        return
      end
         $t = false
      # 切换到菜单画面
      $scene = Scene_Map.new
    end

替换你的class Scene_Save中的update,另外还要建一个save文件夹


[LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~




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