赞 | 1 |
VIP | 2 |
好人卡 | 18 |
积分 | 3 |
经验 | 7766 |
最后登录 | 2012-5-1 |
在线时间 | 227 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 255
- 在线时间
- 227 小时
- 注册时间
- 2009-7-26
- 帖子
- 216
|
这个么……我的看法是楼主没有重置全局变量……
游戏默认的菜单不是有“新游戏”和“继续”么?
它们有个共同点,就是修改了全局变量……
具体点说就是“新游戏”会执行- $game_temp = Game_Temp.new
- $game_system = Game_System.new
- $game_switches = Game_Switches.new
- $game_variables = Game_Variables.new
- $game_self_switches = Game_SelfSwitches.new
- $game_screen = Game_Screen.new
- $game_actors = Game_Actors.new
- $game_party = Game_Party.new
- $game_troop = Game_Troop.new
- $game_map = Game_Map.new
- $game_player = Game_Player.new
复制代码 而选择“继续”会执行- $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)
复制代码 可以看到那些以$game_ 开头的变量都被设置过了
其中有个$game_party变量是管理队伍的角色的
那么如果楼主让甲和乙加入了队伍,$game_party里便会有记录
如果楼主退回标题,再次进入地图却不重置这个变量,那么甲乙自然还在队伍里 |
|