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

Project1

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

[RMVX发布] 【ARPG使用】VX地图快捷功能脚本---地图快速切换场景

[复制链接]

Lv1.梦旅人

梦石
0
星屑
191
在线时间
835 小时
注册时间
2012-9-16
帖子
1811
跳转到指定楼层
1
发表于 2013-8-7 09:11:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
无聊写的脚本,看着注释用吧。。。然后就是上脚本...:
  1. =begin

  2.               ┌─────────────────────────┐
  3.               │此脚本来自小y游戏制作室,使用和转载请保留此信息。 │
  4.               └─────────────────────────┘
  5.                  小y脚本站:http://www.ygameSprite.com/(已失效)

  6. -----------------------------------------------------------------------------
  7.                              *地图快捷功能*
  8.                                                        by.小y
  9. -----------------------------------------------------------------------------
  10.   ■ 说明
  11.     很简易的快捷按键脚本,用于ARPG。
  12.   ■ 功能
  13.     可以在地图中按下快捷键进入物品、状态、装备等场景,也可以直接进入
  14.     任务场景。
  15.   ■ 使用
  16.     插入脚本后,设定快捷按键(可以在游戏中按下F1查看)。
  17.   ■ 注意
  18.     另外,因为可以快捷打开,所以呢,我也把菜单直接禁止掉了。
  19. -----------------------------------------------------------------------------
  20.    
  21.                      ★附加游戏时F1中的按键的设定★
  22.                     (等号右边的是指游戏中键盘按键)
  23.     C=回车键、空格、Z键
  24.     B=Esc键、X键
  25.     A=shift键
  26.     X=A键
  27.     Y=S键
  28.     Z=D键
  29.     L=Q键
  30.     R=W键

  31.     举个例子,比如打开物品场景的按键你设定为R键,那么根据上面的——
  32.          R=W键,在游戏中,你在地图上按下W键就可以打开物品场景。
  33.                当然,使用者也可以搭配全键盘脚本来使用。
  34.                                                               by.小y
  35.                                ■ 紧急 ■
  36.      如果你使用了小y的“新华丽商店画面”脚本,你需要把77行和91行的
  37.      
  38.      $scene = Scene_Menu.new
  39.      
  40.      那句改成
  41.      
  42.      $scene = Scene_Map.new
  43.      
  44.      就是将那个脚本的
  45.      class Scene_Equip < Scene_Base
  46.      和
  47.      class Scene_Item < Scene_Base
  48.      部分里的$scene = Scene_Menu.new(0)  与 $scene = Scene_Menu.new(2)
  49.      改成$scene = Scene_Map.new。
  50. -----------------------------------------------------------------------------

  51. =end

  52. #---------------------------------------
  53. #  ● 设定部分
  54. #---------------------------------------

  55. #打开物品场景的快捷按键
  56. ITEM_KEY = Input::X

  57. #打开技能场景的快捷按键
  58. SKILL_KEY = Input::Z

  59. #打开装备场景的快捷按键
  60. EQUIP_KEY = Input::Y

  61. #打开状态场景的快捷按键
  62. STATUS_KEY = Input::L

  63. #---------------------------------------
  64. #  ● 脚本部分
  65. #---------------------------------------
  66. #-----------------
  67. #  Scene_Map
  68. #-----------------
  69. class Scene_Map < Scene_Base
  70.   def update
  71.     super
  72.     $game_map.interpreter.update      # 更新解释器
  73.     $game_map.update                  # 更新滴入
  74.     $game_player.update               # 更新玩家
  75.     $game_system.update               # 更新计时器
  76.     @spriteset.update                 # 更新活动块元件
  77.     @message_window.update            # 更新消息窗口
  78.     unless $game_message.visible      # 正在显示消息以外的情况
  79.       update_transfer_player
  80.       update_encounter
  81.       update_call_menu
  82.       update_call_debug
  83.       update_call_status
  84.       update_call_item
  85.       update_call_skill
  86.       update_call_equip
  87.       update_scene_change
  88.     end
  89.   end
  90.   def update_call_menu
  91.     if Input.trigger?(Input::A)
  92.       return if $game_map.interpreter.running?        # 正在执行事件?
  93.       return if $game_system.menu_disabled            # 禁止菜单?
  94.       $game_temp.menu_beep = true                     # 设置播放 SE 标志
  95.       $game_temp.next_scene = "map"
  96.     end
  97.   end
  98.   def update_call_item
  99.     if Input.press?(ITEM_KEY)
  100.       return if $game_map.interpreter.running?        # 正在执行事件?
  101.       $game_temp.next_scene = "item"
  102.     end
  103.   end
  104.   def update_call_skill
  105.     if Input.press?(SKILL_KEY)
  106.       return if $game_map.interpreter.running?        # 正在执行事件?
  107.       $game_temp.next_scene = "skill"
  108.     end
  109.   end
  110.   def update_call_equip
  111.     if Input.press?(EQUIP_KEY)
  112.       return if $game_map.interpreter.running?        # 正在执行事件?
  113.       $game_temp.next_scene = "equip"
  114.     end
  115.   end
  116.   def update_call_status
  117.     if Input.press?(STATUS_KEY)
  118.       return if $game_map.interpreter.running?        # 正在执行事件?
  119.       $game_temp.next_scene = "status"
  120.     end
  121.   end
  122.   def update_scene_change
  123.     return if $game_player.moving?    # 角色正在移动?
  124.     case $game_temp.next_scene
  125.     when "battle"
  126.       call_battle
  127.     when "shop"
  128.       call_shop
  129.     when "name"
  130.       call_name
  131.     when "menu"
  132.       call_menu
  133.     when "save"
  134.       call_save
  135.     when "status"
  136.       call_status
  137.     when "item"
  138.       call_item
  139.     when "skill"
  140.       call_skill
  141.     when "equip"
  142.       call_equip
  143.     when "debug"
  144.       call_debug
  145.     when "gameover"
  146.       call_gameover
  147.     when "title"
  148.       call_title
  149.     else
  150.       $game_temp.next_scene = nil
  151.     end
  152.   end
  153.   def call_item
  154.     $game_temp.next_scene = nil
  155.     $scene = Scene_Item.new
  156.   end
  157.   def call_skill
  158.     $game_temp.next_scene = nil
  159.     $scene = Scene_Skill.new(0)
  160.   end
  161.   def call_equip
  162.     $game_temp.next_scene = nil
  163.     $scene = Scene_Equip.new(0)
  164.   end
  165.   def call_status
  166.     $game_temp.next_scene = nil
  167.     $scene = Scene_Status.new(0)
  168.   end
  169. end
  170. #-----------------
  171. #  Scene_Item
  172. #-----------------
  173. class Scene_Item < Scene_Base
  174.   def return_scene
  175.     $scene = Scene_Map.new
  176.   end
  177. end
  178. #-----------------
  179. #  Scene_Skill
  180. #-----------------
  181. class Scene_Skill < Scene_Base
  182.   def return_scene
  183.     $scene = Scene_Map.new
  184.   end
  185. end
  186. #-----------------
  187. #  Scene_Equip
  188. #-----------------
  189. class Scene_Equip < Scene_Base
  190.   def return_scene
  191.     $scene = Scene_Map.new
  192.   end
  193. end
  194. #-----------------
  195. #  Scene_Status
  196. #-----------------
  197. class Scene_Status < Scene_Base
  198.   def return_scene
  199.     $scene = Scene_Map.new
  200.   end
  201. end
复制代码

——旧坑欢迎戳
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-5-29 05:05

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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