Project1

标题: 关于小地图显示的随时切换 [打印本页]

作者: 幻耶    时间: 2008-4-27 00:04
标题: 关于小地图显示的随时切换
在游戏中按SHIFTT随时打开关闭小地图,不要用事件做的话,怎么实现


小地图脚本
http://rpg.blue/web/htm/news294.htm [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 水迭澜    时间: 2008-4-27 00:48
我记得脚本开头有说明……
作者: 3535    时间: 2008-4-27 02:15
Scene_Map
  1.   #--------------------------------------------------------------------------
  2.   # ● 更新画面
  3.   #--------------------------------------------------------------------------
  4.   def update
  5.     # 循环
  6.     loop do
  7.       # 按照地图、实例、主角的顺序更新
  8.       # (这个更新顺序不会在的满足事件的执行条件下成为给予角色瞬间移动
  9.       #  的机会的重要因素)
  10.       $game_map.update
  11.       $game_system.map_interpreter.update
  12.       $game_player.update
  13.       # 系统 (定时器)、画面更新
  14.       $game_system.update
  15.       $game_screen.update
  16.       # 如果主角在场所移动中就中断循环
  17.       unless $game_temp.player_transferring
  18.         break
  19.       end
  20.       # 执行场所移动
  21.       transfer_player
  22.       # 处理过渡中的情况下、中断循环
  23.       if $game_temp.transition_processing
  24.         break
  25.       end
  26.     end
  27.     if Input.press?(Input::SHIFT)
  28.       if $game_system.minimap_visible == true
  29.         $game_system.minimap_visible = false
  30.       else
  31.         $game_system.minimap_visible = true
  32.       end
  33.     end
  34.     # 更新活动区块
  35.     @spriteset.update
  36.     # 更新讯息窗口
  37.     @message_window.update
  38.     # 游戏结束的情况下
  39.     if $game_temp.gameover
  40.       # 切换的游戏结束画面
  41.       $scene = Scene_Gameover.new
  42.       return
  43.     end
  44.     # 返回标题画面的情况下
  45.     if $game_temp.to_title
  46.       # 切换到标题画面
  47.       $scene = Scene_Title.new
  48.       return
  49.     end
  50.     # 处理过渡中的情况下
  51.     if $game_temp.transition_processing
  52.       # 清除过渡处理中标志
  53.       $game_temp.transition_processing = false
  54.       # 执行过渡
  55.       if $game_temp.transition_name == ""
  56.         Graphics.transition(20)
  57.       else
  58.         Graphics.transition(40, "Graphics/Transitions/" +
  59.           $game_temp.transition_name)
  60.       end
  61.     end
  62.     # 显示讯息窗口中的情况下
  63.     if $game_temp.message_window_showing
  64.       return
  65.     end
  66.     # 遇敌计数为 0 且、且遇敌清单不为空白的情况下
  67.     if $game_player.encounter_count == 0 and $game_map.encounter_list != []
  68.       # 不是在事件执行中或者禁止遇敌中
  69.       unless $game_system.map_interpreter.running? or
  70.              $game_system.encounter_disabled
  71.         # 确定队伍
  72.         n = rand($game_map.encounter_list.size)
  73.         troop_id = $game_map.encounter_list[n]
  74.         # 队伍有效的话
  75.         if $data_troops[troop_id] != nil
  76.           # 设定呼叫战斗标志
  77.           $game_temp.battle_calling = true
  78.           $game_temp.battle_troop_id = troop_id
  79.           $game_temp.battle_can_escape = true
  80.           $game_temp.battle_can_lose = false
  81.           $game_temp.battle_proc = nil
  82.         end
  83.       end
  84.     end
  85.     # 按下 B 键的情况下
  86.     if Input.trigger?(Input::B)
  87.       # 不是在事件执行中或选单禁止中
  88.       unless $game_system.map_interpreter.running? or
  89.              $game_system.menu_disabled
  90.         # 设定选单呼叫标志以及 SE 演奏
  91.         $game_temp.menu_calling = true
  92.         $game_temp.menu_beep = true
  93.       end
  94.     end
  95.     # 侦错模式为 ON 并且按下 F9 键的情况下
  96.     if $DEBUG and Input.press?(Input::F9)
  97.       # 设定呼叫侦错标志
  98.       $game_temp.debug_calling = true
  99.     end
  100.     # 不在主角移动中的情况下
  101.     unless $game_player.moving?
  102.       # 执行各种画面的呼叫
  103.       if $game_temp.battle_calling
  104.         call_battle
  105.       elsif $game_temp.shop_calling
  106.         call_shop
  107.       elsif $game_temp.name_calling
  108.         call_name
  109.       elsif $game_temp.menu_calling
  110.         call_menu
  111.       elsif $game_temp.save_calling
  112.         call_save
  113.       elsif $game_temp.debug_calling
  114.         call_debug
  115.       end
  116.     end
  117.   end
复制代码
[LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1