Project1

标题: 如何在对话的时候也能打开菜单? [打印本页]

作者: 影之ZXA    时间: 2017-5-7 11:15
标题: 如何在对话的时候也能打开菜单?
本人在制作逆转的同人游戏,原版中的查看答案太麻烦了,于是决定用菜单来代替,不过不会在对话的时候也能随时打开菜单(按X就能打开菜单里的“物品”,最好能有开关设置什么时候能呼出,什么时候不能)
作者: 魔法丶小肉包    时间: 2017-5-7 11:56
在1号开关打开的时候,按键盘上的Q键即可打开物品界面(无视是否有事件正在运行)
RUBY 代码复制
  1. class Scene_Map < Scene_Base
  2.   def update
  3.     super
  4.     $game_map.update(true)
  5.     $game_player.update
  6.     $game_timer.update
  7.     @spriteset.update
  8.     update_call_menuitem unless scene_changing?
  9.     update_scene if scene_change_ok?
  10.   end
  11.   def update_call_menuitem
  12.     if $game_switches[1] == false
  13.       @item_calling = false
  14.     else
  15.       @item_calling ||= Input.trigger?(:L)
  16.       call_menuitem if @item_calling && !$game_player.moving?
  17.     end
  18.   end
  19.   def call_menuitem
  20.     Sound.play_ok
  21.     SceneManager.call(Scene_Item)
  22.     @item_calling = false
  23.   end
  24. end

作者: 影之ZXA    时间: 2017-6-29 19:10
魔法丶小肉包 发表于 2017-5-7 11:56
在1号开关打开的时候,按键盘上的Q键即可打开物品界面(无视是否有事件正在运行)
class Scene_Map < Scene ...

谢谢,正需要这个(一个月没登6R了)




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