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

Project1

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

[已经解决] 如何不允许存档在第1个档位?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
157
在线时间
291 小时
注册时间
2012-1-29
帖子
195
跳转到指定楼层
1
发表于 2012-2-1 12:51:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
想留第一个档位为自动存档
DataManager.save_game(0)
但是怕玩家不懂,乱存…………至少给个提示…………

Lv4.逐梦者

梦石
0
星屑
5463
在线时间
2562 小时
注册时间
2011-9-27
帖子
1120

极短23参与开拓者

2
发表于 2012-2-1 13:21:21 | 只看该作者
本帖最后由 怕鼠的猫 于 2012-2-3 08:29 编辑
  1. class Scene_Save     
  2.    def ensure_cursor_visible
  3.    @index=1 if @index==0 #强制不能选择1号
  4.     self.top_index = index if index < top_index
  5.     self.bottom_index = index if index > bottom_index
  6.   end

  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化选择状态
  9.   #--------------------------------------------------------------------------
  10.   def init_selection
  11.     @index = first_savefile_index
  12.     @index=1 if @index==0 #强制不能选择1号
  13.     @savefile_windows[@index].selected = true
  14.     self.top_index = @index - visible_max / 2
  15.     ensure_cursor_visible
  16.   end

  17. end  
复制代码
改过之后的样子。

点评

……脚本执行错误…………  发表于 2012-2-2 20:44
能不储存在第一个么  发表于 2012-2-1 13:31
从平淡走向更平淡。
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
779
在线时间
21 小时
注册时间
2010-7-10
帖子
2
3
发表于 2012-2-2 20:57:28 | 只看该作者
本帖最后由 tzhx 于 2012-2-2 20:58 编辑

楼上的有两个错误,都在03行,@多打了一个空,数组成员引用下标从0开始
  1. class Scene_Save     
  2.    def ensure_cursor_visible
  3.     @index=1 if @index==0  #RMVA中save的数组成员引用下标从0开始
  4.     self.top_index = index if index < top_index
  5.     self.bottom_index = index if index > bottom_index
  6.   end
  7. end   
复制代码
但是即使这样也会有小缺陷,你试试就知道。
解决方法很简单
1、找到场景中的Scene_Save
2、将第19行改为
  1.     DataManager.last_savefile_index+1
复制代码
3、保存


加个分吧

点评

很好,但楼上的更方便  发表于 2012-2-3 20:03
回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-28 05:32

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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