查看: 1943|回复: 1

[已经过期] 事件能否直接读指定的一个存档

  [复制链接]
头像被屏蔽
梦石
0
星屑
50
在线时间
2 小时
注册时间
2009-2-4
回帖
15
发表于 2011-1-21 14:45:11 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽

虱子

梦石
0
星屑
121
在线时间
1782 小时
注册时间
2010-6-19
回帖
3515
发表于 2011-1-21 18:35:13 | 显示全部楼层
  1. class Interpreter
  2.   def load(n)
  3.     filename = "Save#{n}.rxdata"
  4.     unless FileTest.exist?(filename)
  5.       $game_system.se_play($data_system.buzzer_se)
  6.       return
  7.     end
  8.     $game_system.se_play($data_system.load_se)
  9.     file = File.open(filename, "rb")
  10.     characters = Marshal.load(file)
  11.     Graphics.frame_count = Marshal.load(file)
  12.     $game_system        = Marshal.load(file)
  13.     $game_switches      = Marshal.load(file)
  14.     $game_variables     = Marshal.load(file)
  15.     $game_self_switches = Marshal.load(file)
  16.     $game_screen        = Marshal.load(file)
  17.     $game_actors        = Marshal.load(file)
  18.     $game_party         = Marshal.load(file)
  19.     $game_troop         = Marshal.load(file)
  20.     $game_map           = Marshal.load(file)
  21.     $game_player        = Marshal.load(file)
  22.     if $game_system.magic_number != $data_system.magic_number
  23.       $game_map.setup($game_map.map_id)
  24.       $game_player.center($game_player.x, $game_player.y)
  25.     end
  26.     $game_party.refresh
  27.     file.close
  28.     $game_map.update
  29.     $scene = Scene_Map.new
  30.   end
  31. end
复制代码
在事件脚本调用load(存档号)

http://rpg.blue/thread-175056-1-2.html
PVZ型塔防物一个
http://rpg.blue/thread-155199-1-2.html
RMXP技术讨论区手动认可帖,得到答案请认可
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部