查看: 1908|回复: 3

[已经解决] Scene_Title 的问題

  [复制链接]
梦石
0
星屑
9058
在线时间
1860 小时
注册时间
2010-7-18
回帖
916
发表于 2011-9-2 18:12:19 | 显示全部楼层 |阅读模式

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

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

×

關於 Scene_Title中的 continue

小弟想改成 :

執行 continue 直接讀取 Save_File 的第一個紀錄

請問要怎麼修改 ?

(?????)

梦石
0
星屑
872
在线时间
1327 小时
注册时间
2011-7-18
回帖
3036

贵宾

发表于 2011-9-2 18:37:22 | 显示全部楼层
本帖最后由 各种压力的猫君 于 2011-9-2 20:02 编辑

Scene_Title 约227-246行 改成这样
  1.   #--------------------------------------------------------------------------
  2.   # ● 命令:继续游戏
  3.   #--------------------------------------------------------------------------
  4.   def command_continue
  5.     if @continue_enabled
  6.       Sound.play_decision
  7.       #$scene = Scene_File.new(false, true, false)
  8.       file = File.open(Save1.rvdata, "rb")
  9.       read_save_data(file)
  10.       file.close
  11.       $scene = Scene_Map.new
  12.       RPG::BGM.fade(1500)
  13.       Graphics.fadeout(60)
  14.       Graphics.wait(40)
  15.       @last_bgm.play
  16.       @last_bgs.play
  17.     else
  18.       Sound.play_buzzer
  19.     end
  20.   end
复制代码

如楼下所说这样不行 = = ||| 请用楼下的方法
回复

使用道具 举报

梦石
0
星屑
50
在线时间
543 小时
注册时间
2009-7-13
回帖
56
发表于 2011-9-2 19:12:48 | 显示全部楼层
read_save_data是Scene_File的方法……楼上那样不行的
  1.   def command_continue
  2.     if @continue_enabled
  3.       Sound.play_decision
  4.       #$scene = Scene_File.new(false, true, false)
  5.       file = File.open("Save1.rvdata", "rb")
  6.       characters           = Marshal.load(file)
  7.       Graphics.frame_count = Marshal.load(file)
  8.       @last_bgm            = Marshal.load(file)
  9.       @last_bgs            = Marshal.load(file)
  10.       $game_system         = Marshal.load(file)
  11.       $game_message        = Marshal.load(file)
  12.       $game_switches       = Marshal.load(file)
  13.       $game_variables      = Marshal.load(file)
  14.       $game_self_switches  = Marshal.load(file)
  15.       $game_actors         = Marshal.load(file)
  16.       $game_party          = Marshal.load(file)
  17.       $game_troop          = Marshal.load(file)
  18.       $game_map            = Marshal.load(file)
  19.       $game_player         = Marshal.load(file)
  20.       if $game_system.version_id != $data_system.version_id
  21.         $game_map.setup($game_map.map_id)
  22.         $game_player.center($game_player.x, $game_player.y)
  23.       end
  24.       $scene = Scene_Map.new
  25.       RPG::BGM.fade(1500)
  26.       Graphics.fadeout(60)
  27.       Graphics.wait(40)
  28.       @last_bgm.play
  29.       @last_bgs.play
  30.     else
  31.       Sound.play_buzzer
  32.     end
  33.   end
复制代码
不过要保证Save1.rvdata存在,不然会报错。
最好把Scene_Title里的check_continue这个方法也改掉
  1.   def check_continue
  2.     @continue_enabled = (Dir.glob('Save1.rvdata').size == 1)
  3.   end
复制代码
退屈すぎ…
回复

使用道具 举报

梦石
0
星屑
9058
在线时间
1860 小时
注册时间
2010-7-18
回帖
916
 楼主| 发表于 2011-9-2 22:22:58 | 显示全部楼层

感謝兩位 !!!!
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部