Project1
标题:
怎样将所有开关,变量全部初始化?
[打印本页]
作者:
ace69
时间:
2009-1-20 22:13
标题:
怎样将所有开关,变量全部初始化?
如题,如果要进行二周目,我想把所有变量,开关,地图等全部初始化,请问要怎样实现?多谢!
Graphics.frame_count = 0
$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
复制代码
直接运行这段的话会出错 [LINE]1,#dddddd[/LINE]
此贴于 2009-1-21 13:19:11 被版主darkten提醒,请楼主看到后对本贴做出回应。
[LINE]1,#dddddd[/LINE]
版务信息:版主帮忙结贴~
作者:
缺牙de兔子
时间:
2009-1-20 22:21
用for循环遍历5000个开关
for i=0 in i..5000
$game_self_switches
=false
end
变量全部还原--也用for循环让他们都=0
for i=0 in i..5000
$game_variables
=0
end
变量和开关的最大值都是5000 [LINE]1,#dddddd[/LINE]
系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~
作者:
「旅」
时间:
2009-1-20 22:26
再加上
$game_party.setup_starting_members
$game_map.setup($data_system.start_map_id) # 地图编号
$game_player.moveto($data_system.start_x, $data_system.start_y) # 地图XY
$game_player.refresh
$game_map.autoplay
$game_map.update
$scene = Scene_Map.new
括号里的内容可更改为需要的位置(直接换成数字即可) [LINE]1,#dddddd[/LINE]
版主对此帖的认可:『正确解答,补上悬赏积分100分+1卡(250分),感激你的热情解答...』,积分『+350』。
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1