Project1
标题:
事件能否直接读指定的一个存档
[打印本页]
作者:
刀疤湛
时间:
2011-1-21 14:45
提示:
作者被禁止或删除 内容自动屏蔽
作者:
Wind2010
时间:
2011-1-21 18:35
class Interpreter
def load(n)
filename = "Save#{n}.rxdata"
unless FileTest.exist?(filename)
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.load_se)
file = File.open(filename, "rb")
characters = Marshal.load(file)
Graphics.frame_count = Marshal.load(file)
$game_system = Marshal.load(file)
$game_switches = Marshal.load(file)
$game_variables = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_screen = Marshal.load(file)
$game_actors = Marshal.load(file)
$game_party = Marshal.load(file)
$game_troop = Marshal.load(file)
$game_map = Marshal.load(file)
$game_player = Marshal.load(file)
if $game_system.magic_number != $data_system.magic_number
$game_map.setup($game_map.map_id)
$game_player.center($game_player.x, $game_player.y)
end
$game_party.refresh
file.close
$game_map.update
$scene = Scene_Map.new
end
end
复制代码
在事件脚本调用load(存档号)
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1