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

Project1

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

[已经过期] 关于存档扩展的问题

[复制链接]

Lv1.梦旅人

梦石
0
星屑
314
在线时间
18 小时
注册时间
2013-8-8
帖子
2
跳转到指定楼层
1
发表于 2013-8-23 20:45:50 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
是在是太悲伤了。。。。添加了这个脚本之后。。。我本来就是手贱。。然后上下乱按结果往上按的时候弹出来了这个。。希望有人能帮忙解决一下。。谢谢。。
不知道怎么添加脚本OTZ
RUBY 代码复制
  1. #==============================================================================
  2. # 本脚本来自[url]www.66rpg.com[/url],转载和使用请保留此信息 #==============================================================================
  3.  
  4. #==============================================================================
  5. # ■ Scene_File
  6. #------------------------------------------------------------------------------
  7. #  存档画面及读档画面的超级类。
  8. #   脚本优化: SailCat
  9. #==============================================================================
  10.  
  11. class Scene_File
  12. #--------------------------------------------------------------------------
  13. # ● 常量 (存档页数)
  14. #--------------------------------------------------------------------------
  15. MaxPages = 25
  16. #--------------------------------------------------------------------------
  17. # ● 初始化对像
  18. #     help_text : 帮助窗口显示的字符串
  19. #--------------------------------------------------------------------------
  20. def initialize(help_text)
  21.    @help_text = help_text
  22.    @slots = MaxPages * 4
  23. end
  24. #--------------------------------------------------------------------------
  25. # ● 主处理
  26. #--------------------------------------------------------------------------
  27. def main
  28.    # 生成帮助窗口
  29.    @help_window = Window_Help.new
  30.    @help_window.set_text(@help_text)
  31.    @file_index = $game_temp.last_file_index
  32.    # 生成存档文件窗口
  33.    @savefile_windows = []
  34.    # 选择最后操作的文件
  35.    for i in @file_index / 4 * 4..@file_index / 4 * 4 + 3
  36.      load_window(i)
  37.      @savefile_windows[i].visible = true
  38.    end
  39.    @savefile_windows[@file_index].selected = true
  40.    # 执行过渡
  41.    Graphics.transition
  42.    # 主循环
  43.    loop do
  44.      # 刷新游戏画面
  45.      Graphics.update
  46.      # 刷新输入信息
  47.      Input.update
  48.      # 刷新画面
  49.      update
  50.      # 如果画面被切换的话就中断循环
  51.      if $scene != self
  52.        break
  53.      end
  54.    end
  55.    # 准备过渡
  56.    Graphics.freeze
  57.    # 释放窗口
  58.    @help_window.dispose
  59.    for i in @savefile_windows
  60.      i.dispose
  61.    end
  62. end
  63. #--------------------------------------------------------------------------
  64. # ● 刷新画面
  65. #--------------------------------------------------------------------------
  66. def update
  67.    # 刷新窗口
  68.    @help_window.update
  69.    for i in @savefile_windows
  70.      i.update if i.visible
  71.    end
  72.    # 按下 C 键的情况下
  73.    if Input.trigger?(Input::C)
  74.      # 调用过程 on_decision (定义继承目标)
  75.      on_decision(make_filename(@file_index))
  76.      $game_temp.last_file_index = @file_index
  77.      return
  78.    end
  79.    # 按下 B 键的情况下
  80.    if Input.trigger?(Input::B)
  81.      # 调用过程 on_cancel (定义继承目标)
  82.      on_cancel
  83.      return
  84.    end
  85.    # 按下方向键下的情况下
  86.    if Input.repeat?(Input::DOWN)
  87.      # 演奏光标 SE
  88.      $game_system.se_play($data_system.cursor_se)
  89.      # 光标向下移动
  90.      @savefile_windows[@file_index].selected = false
  91.      @file_index = (@file_index + 1) % @slots
  92.      # 翻到下一页的情况下
  93.      if @file_index % 4 == 0
  94.        for index in @file_index / 4 * 4..@file_index / 4 * 4 + 3
  95.          @savefile_windows[(index + @slots - 4) % @slots].visible = false
  96.          load_window(index)
  97.          @savefile_windows[index].visible = true
  98.        end
  99.      end
  100.      @savefile_windows[@file_index].selected = true
  101.      return
  102.    end
  103.    # 按下方向键上的情况下
  104.    if Input.repeat?(Input::UP)
  105.      # 演奏光标 SE
  106.      $game_system.se_play($data_system.cursor_se)
  107.      # 光标向上移动
  108.      @savefile_windows[@file_index].selected = false
  109.      @file_index = (@file_index + @slots - 1) % @slots
  110.      # 翻到上一页的情况下
  111.      if @file_index % 4 == 3
  112.        for index in @file_index / 4 * 4..@file_index / 4 * 4 + 3
  113.          @savefile_windows[(index + 4) % @slots].visible = false
  114.          load_window(index)
  115.          @savefile_windows[index].visible = true
  116.        end
  117.      end
  118.      @savefile_windows[@file_index].selected = true
  119.      return
  120.    end
  121.    # 按下方向键左或者 L 的情况下
  122.    if Input.repeat?(Input::LEFT) or Input.trigger?(Input::L)
  123.      # 演奏光标 SE
  124.      $game_system.se_play($data_system.cursor_se)
  125.      # 前翻一页
  126.      @savefile_windows[@file_index].selected = false
  127.      @file_index = (@file_index + @slots - 4) % @slots
  128.      for index in @file_index / 4 * 4..@file_index / 4 * 4 + 3
  129.        @savefile_windows[(index + 4) % @slots].visible = false
  130.        load_window(index)
  131.        @savefile_windows[index].visible = true
  132.      end
  133.      @savefile_windows[@file_index].selected = true
  134.      return
  135.    end
  136.    # 按下方向键右或者 R 的情况下
  137.    if Input.repeat?(Input::RIGHT) or Input.trigger?(Input::R)
  138.      # 演奏光标 SE
  139.      $game_system.se_play($data_system.cursor_se)
  140.      # 前翻一页
  141.      @savefile_windows[@file_index].selected = false
  142.      @file_index = (@file_index + 4) % @slots
  143.      for index in @file_index / 4 * 4..@file_index / 4 * 4 + 3
  144.        @savefile_windows[(index + @slots - 4) % @slots].visible = false
  145.        load_window(index)
  146.        @savefile_windows[index].visible = true
  147.      end
  148.      @savefile_windows[@file_index].selected = true
  149.      return
  150.    end
  151. end
  152. #--------------------------------------------------------------------------
  153. # ● 生成文件名
  154. #     file_index : 文件名的索引 (0~n)
  155. #--------------------------------------------------------------------------
  156. def make_filename(file_index)
  157.    return "Save#{file_index + 1}.rxdata"
  158. end
  159. #--------------------------------------------------------------------------
  160. # ● 载入当前页存档
  161. #     避免因存档位过多造成的卡壳现象
  162. #--------------------------------------------------------------------------
  163. def load_window(i)
  164.    if @savefile_windows[i] != nil
  165.      return
  166.    else
  167.      @savefile_windows[i] = Window_SaveFile.new(i, make_filename(i))
  168.    end
  169. end
  170. end
  171.  
  172. #==============================================================================
  173. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  174. #==============================================================================

QQ截图20130823203032.png (7.21 KB, 下载次数: 3)

QQ截图20130823203032.png

Lv1.梦旅人

超级囧神 无尽的灌水

梦石
0
星屑
144
在线时间
784 小时
注册时间
2010-6-27
帖子
2065
2
发表于 2013-8-23 23:41:06 | 只看该作者
虽然不懂脚本,但是if好像用错了
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
314
在线时间
18 小时
注册时间
2013-8-8
帖子
2
3
 楼主| 发表于 2013-8-23 23:45:45 | 只看该作者
a554187203 发表于 2013-8-23 23:41
虽然不懂脚本,但是if好像用错了

是…是么……

QQ图片20130823234533.jpg (1.03 KB, 下载次数: 8)

QQ图片20130823234533.jpg

点评

貌似是脚本本身的问题,因为我在一个新工程里用的时候也出错了,换脚本吧  发表于 2013-8-24 00:26
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-29 22:23

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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