设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1897|回复: 3
打印 上一主题 下一主题

[已经解决] 关于菜单快捷键

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
37 小时
注册时间
2010-6-21
帖子
44
跳转到指定楼层
1
发表于 2011-5-24 14:31:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 fux2 于 2011-5-24 15:22 编辑

请问怎样才能在指定地图上使用菜单快捷键?就是当
主角走到某个地图,不能使用主菜单画面,但可
以用快捷开启其它的,有没有办法实现呢?

而且直接用禁止开启菜单的话,连快捷功能
也会跟着失效+_+"。

有请大大指教,感谢~
  1. #==============================================================================
  2. # ■ 本?本源自[url]www.66rpg.com[/url],??与使用?保留此信息
  3. #==============================================================================

  4. #==============================================================================
  5. # 菜?快捷?           by Claimh
  6. #------------------------------------------------------------------------------
  7. # [url]http://www.k3.dion.ne.jp/~claimh/[/url]
  8. #==============================================================================

  9. module SHORTCUT
  10.   USE_ITEM_SHORT = true   #——??物品菜?快捷?
  11.   USE_SKILL_SHORT = true  #——??特技菜?快捷?
  12.   USE_EQUIP_SHORT = true  #——????菜?快捷?
  13.   USE_SAVE_SHORT = false   #——???存菜?快捷?

  14.   CHANGE_ITEM = Input::X  #——物品快捷?的?位
  15.   CHANGE_SKILL = Input::Y #——特技快捷?的?位
  16.   CHANGE_EQUIP = Input::Z #——??快捷?的?位
  17.   CHANGE_SAVE = Input::A  #——?存快捷?的?位
  18. #----------------------------------------------------------------------------
  19. #----------------------------------------------------------------------------
  20. end

  21. #==============================================================================
  22. # Scene_Map
  23. #==============================================================================
  24. class Scene_Map
  25.   include SHORTCUT
  26.   alias update_short update
  27.   def update
  28.     update_short
  29.     menu_shortcut
  30.   end

  31.   #--------------------------------------------------------------------------
  32.   #--------------------------------------------------------------------------
  33.   def menu_shortcut
  34.     if Input.trigger?(CHANGE_ITEM) and USE_ITEM_SHORT
  35.       unless $game_system.map_interpreter.running? or
  36.              $game_system.menu_disabled
  37.         $game_temp.menu_calling = true
  38.         $game_temp.menu_beep = true
  39.         $item_short = true
  40.         call_item
  41.       end
  42.     end
  43.     if Input.trigger?(CHANGE_SKILL) and USE_SKILL_SHORT
  44.       unless $game_system.map_interpreter.running? or
  45.              $game_system.menu_disabled
  46.         $game_temp.menu_calling = true
  47.         $game_temp.menu_beep = true
  48.         $skill_short = true
  49.         call_skill
  50.       end
  51.     end
  52.     if Input.trigger?(CHANGE_EQUIP) and USE_EQUIP_SHORT
  53.       unless $game_system.map_interpreter.running? or
  54.              $game_system.menu_disabled
  55.         $game_temp.menu_calling = true
  56.         $game_temp.menu_beep = true
  57.         $equip_short = true
  58.         call_equip
  59.       end
  60.     end
  61.     if Input.trigger?(CHANGE_SAVE) and USE_SAVE_SHORT
  62.       unless $game_system.map_interpreter.running? or
  63.              $game_system.menu_disabled
  64.         $game_temp.menu_calling = true
  65.         $game_temp.menu_beep = true
  66.         $save_short = true
  67.         call_save
  68.       end
  69.     end
  70.   end

  71.   #--------------------------------------------------------------------------
  72.   #--------------------------------------------------------------------------
  73.   def call_item
  74.     $game_temp.menu_calling = false
  75.     if $game_temp.menu_beep
  76.       $game_system.se_play($data_system.decision_se)
  77.       $game_temp.menu_beep = false
  78.     end
  79.     $game_player.straighten
  80.     $scene = Scene_Item.new
  81.   end
  82.   #--------------------------------------------------------------------------
  83.   #--------------------------------------------------------------------------
  84.   def call_skill
  85.     $game_temp.menu_calling = false
  86.     if $game_temp.menu_beep
  87.       $game_system.se_play($data_system.decision_se)
  88.       $game_temp.menu_beep = false
  89.     end
  90.     $game_player.straighten
  91.     $scene = Scene_Skill.new
  92.   end
  93.   #--------------------------------------------------------------------------
  94.   #--------------------------------------------------------------------------
  95.   def call_equip
  96.     $game_temp.menu_calling = false
  97.     if $game_temp.menu_beep
  98.       $game_system.se_play($data_system.decision_se)
  99.       $game_temp.menu_beep = false
  100.     end
  101.     $game_player.straighten
  102.     $scene = Scene_Equip.new
  103.   end
  104.   #--------------------------------------------------------------------------
  105.   #--------------------------------------------------------------------------
  106.   def call_save
  107.     $game_temp.menu_calling = false
  108.     if $game_temp.menu_beep
  109.       $game_system.se_play($data_system.decision_se)
  110.       $game_temp.menu_beep = false
  111.     end
  112.     $game_player.straighten
  113.     $scene = Scene_Save.new
  114.   end
  115. end

  116. #==============================================================================
  117. # Scene_Item
  118. #==============================================================================
  119. class Scene_Item
  120.   alias update_item_short update_item
  121.   def update_item
  122.     if Input.trigger?(Input::B) and $item_short
  123.       $item_short = false
  124.       $game_system.se_play($data_system.cancel_se)
  125.       $scene = Scene_Map.new
  126.       return
  127.     end
  128.     update_item_short
  129.   end
  130. end

  131. #==============================================================================
  132. # Scene_Skill
  133. #==============================================================================
  134. class Scene_Skill
  135.   alias update_skill_short update_skill
  136.   def update_skill
  137.     if Input.trigger?(Input::B) and $skill_short
  138.       $skill_short = false
  139.       $game_system.se_play($data_system.cancel_se)
  140.       $scene = Scene_Map.new
  141.       return
  142.     end
  143.     update_skill_short
  144.   end
  145. end

  146. #==============================================================================
  147. # Scene_Equip
  148. #==============================================================================
  149. class Scene_Equip
  150.   alias update_equip_short update_right
  151.   def update_right
  152.     if Input.trigger?(Input::B) and $equip_short
  153.       $equip_short = false
  154.       $game_system.se_play($data_system.cancel_se)
  155.       $scene = Scene_Map.new
  156.       return
  157.     end
  158.     update_equip_short
  159.   end
  160. end

  161. #==============================================================================
  162. # Scene_Save
  163. #==============================================================================
  164. class Scene_Save
  165.   alias update_save_short on_cancel
  166.   def on_cancel
  167.     if $save_short
  168.       $save_short = false
  169.       $game_system.se_play($data_system.cancel_se)
  170.       $scene = Scene_Map.new
  171.       return
  172.     end
  173.     update_save_short
  174.   end

  175.   alias save_decision on_decision
  176.   def on_decision(filename)
  177.     if $save_short
  178.       $game_system.se_play($data_system.save_se)
  179.       file = File.open(filename, "wb")
  180.       write_save_data(file)
  181.       file.close
  182.       $save_short
  183.       $scene = Scene_Map.new
  184.     end
  185.     save_decision
  186.   end
  187. end
复制代码

Lv1.梦旅人

梦石
0
星屑
55
在线时间
323 小时
注册时间
2010-8-21
帖子
666
2
发表于 2011-5-24 17:48:28 | 只看该作者
请尝试把脚本中所有的
$game_system.menu_disabled
删掉,不过请注意要把前面的
or
一起删掉,
如果lz怕出问题,就把所有的
$game_system.menu_disabled
改成 false

点评

点灰兄早。  发表于 2011-5-27 20:20

评分

参与人数 1星屑 +200 梦石 +2 收起 理由
禾西 + 200 + 2 認可

查看全部评分

>>猛戳>>MetalSagaR游戏主页<<这里<<
欢迎提供您的意见
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
37 小时
注册时间
2010-6-21
帖子
44
3
 楼主| 发表于 2011-5-26 21:08:50 | 只看该作者
3Q,我试式看
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
37 小时
注册时间
2010-6-21
帖子
44
4
 楼主| 发表于 2011-5-27 13:41:47 | 只看该作者
可以了,谢谢大大。
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-16 15:41

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表