幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 1490|回复: 5

[RMVX] [求助]关于存档

[复制链接]

1

主题

8

帖子

3921

积分

⑥精研

积分
3921
QQ
发表于 2007-5-11 06:27:01 | 显示全部楼层 |阅读模式
怎麽开14个档?我是新手。
作游戏,很难。
回复

使用道具 举报

550

主题

9117

帖子

214748万

积分

超级版主

如同神一般的存在,腿神!拖后腿的神~~

Rank: 8Rank: 8

积分
2147483647
发表于 2007-5-11 06:51:32 | 显示全部楼层
scene_file
我就是你们的神,庶民们,追随我吧!跟着我一起拖后腿!
回复 支持 反对

使用道具 举报

好人卡的 该用户已被删除
发表于 2007-5-11 08:30:48 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

1

主题

8

帖子

3921

积分

⑥精研

积分
3921
QQ
 楼主| 发表于 2007-5-15 01:42:17 | 显示全部楼层
引用第2楼好人卡的神话2007-05-11 08:30发表的:
翻老贴看看吧。
在哪?
作游戏,很难。
回复 支持 反对

使用道具 举报

550

主题

9117

帖子

214748万

积分

超级版主

如同神一般的存在,腿神!拖后腿的神~~

Rank: 8Rank: 8

积分
2147483647
发表于 2007-5-15 01:45:52 | 显示全部楼层
搜索阿!还要别人把饭喂到你嘴边啊……郁闷……

话说,,反正我不是斑竹,,不用忍耐了吧…… [s:5]
我就是你们的神,庶民们,追随我吧!跟着我一起拖后腿!
回复 支持 反对

使用道具 举报

38

主题

3468

帖子

1

积分

超级版主

传说中的Bunny火神~!

Rank: 8Rank: 8

积分
1
发表于 2007-5-15 04:17:33 | 显示全部楼层
用这个替换原来的Scene_File:
  1. #脚本资源:[url]http://www.phylomortis.com/resource/script/scr039.html[/url]
  2. class Scene_File
  3.   SAVEFILE_MAX = 99
  4. # -------------------
  5. def initialize(help_text)
  6.   @help_text = help_text
  7. end
  8. # -------------------
  9. def main
  10.   @help_window = Window_Help.new
  11.   @help_window.set_text(@help_text)
  12.   @savefile_windows = []
  13.   @cursor_displace = 0
  14.   for i in 0..3
  15.     @savefile_windows.push(Window_SaveFile.new(i, make_filename(i), i))
  16.   end
  17.   @file_index = 0
  18.   @savefile_windows[@file_index].selected = true
  19.   Graphics.transition
  20.   loop do
  21.     Graphics.update
  22.     Input.update
  23.     update
  24.     if $scene != self
  25.       break
  26.     end
  27.   end
  28.   Graphics.freeze
  29.   @help_window.dispose
  30.   for i in @savefile_windows
  31.     i.dispose
  32.   end
  33. end
  34. # -------------------
  35. def update
  36.   @help_window.update
  37.   for i in @savefile_windows
  38.     i.update
  39.   end
  40.   if Input.trigger?(Input::C)
  41.     on_decision(make_filename(@file_index))
  42.     $game_temp.last_file_index = @file_index
  43.     return
  44.   end
  45.   if Input.trigger?(Input::B)
  46.     on_cancel
  47.     return
  48.   end
  49.   if Input.repeat?(Input::DOWN)
  50.     if Input.trigger?(Input::DOWN) or @file_index < SAVEFILE_MAX - 1
  51.       if @file_index == SAVEFILE_MAX - 1
  52.         $game_system.se_play($data_system.buzzer_se)
  53.         return
  54.       end
  55.       @cursor_displace += 1
  56.       if @cursor_displace == 4
  57.         @cursor_displace = 3
  58.         for i in @savefile_windows
  59.           i.dispose
  60.         end
  61.         @savefile_windows = []
  62.         for i in 0..3
  63.           f = i - 2 + @file_index
  64.           name = make_filename(f)
  65.           @savefile_windows.push(Window_SaveFile.new(f, name, i))
  66.           @savefile_windows[i].selected = false
  67.         end
  68.       end
  69.       $game_system.se_play($data_system.cursor_se)
  70.       @file_index = (@file_index + 1)
  71.       if @file_index == SAVEFILE_MAX
  72.         @file_index = SAVEFILE_MAX - 1
  73.       end
  74.       for i in 0..3
  75.         @savefile_windows[i].selected = false
  76.       end
  77.       @savefile_windows[@cursor_displace].selected = true
  78.       return
  79.     end
  80.   end
  81.   if Input.repeat?(Input::UP)
  82.     if Input.trigger?(Input::UP) or @file_index > 0
  83.       if @file_index == 0
  84.         $game_system.se_play($data_system.buzzer_se)
  85.         return
  86.       end
  87.       @cursor_displace -= 1
  88.       if @cursor_displace == -1
  89.         @cursor_displace = 0
  90.         for i in @savefile_windows
  91.           i.dispose
  92.         end
  93.         @savefile_windows = []
  94.         for i in 0..3
  95.           f = i - 1 + @file_index
  96.           name = make_filename(f)
  97.           @savefile_windows.push(Window_SaveFile.new(f, name, i))
  98.           @savefile_windows[i].selected = false
  99.         end
  100.       end
  101.       $game_system.se_play($data_system.cursor_se)
  102.       @file_index = (@file_index - 1)
  103.       if @file_index == -1
  104.         @file_index = 0
  105.       end
  106.       for i in 0..3
  107.         @savefile_windows[i].selected = false
  108.       end
  109.       @savefile_windows[@cursor_displace].selected = true
  110.       return
  111.     end
  112.   end
  113. end
  114. # -------------------
  115. def make_filename(file_index)
  116.   return "Save#{file_index + 1}.rxdata"
  117. end
  118. # -------------------
  119. end
复制代码

然后用这个替换Window_SaveFile的initialize部分:
  1. def initialize(file_index, filename, position)
  2.   y = 64 + position * 104
  3.   super(0, y, 640, 104)
  4.   self.contents = Bitmap.new(width - 32, height - 32)
  5.   @file_index = file_index
  6.   @filename = "Save#{@file_index + 1}.rxdata"
  7.   @time_stamp = Time.at(0)
  8.   @file_exist = FileTest.exist?(@filename)
  9.   if @file_exist
  10.     file = File.open(@filename, "r")
  11.     @time_stamp = file.mtime
  12.     @characters = Marshal.load(file)
  13.     @frame_count = Marshal.load(file)
  14.     @game_system = Marshal.load(file)
  15.     @game_switches = Marshal.load(file)
  16.     @game_variables = Marshal.load(file)
  17.     @total_sec = @frame_count / Graphics.frame_rate
  18.     file.close
  19.   end
  20.   refresh
  21.   @selected = false
  22. end
复制代码
我突然发现,我是一个很幸运的好人。老婆真好~ 点我进入JQ(激情)教程范例收集!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2026-6-21 06:21 , Processed in 0.016667 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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