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

Project1

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

[已经过期] 戰鬥中裝備

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
158 小时
注册时间
2008-4-12
帖子
43
跳转到指定楼层
1
发表于 2012-4-15 02:54:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
各位大大好!!
請問VA是否有辦法在「戰鬥中更換裝備」
因為VA有技能限制武器的功能
所以必須換置武器才可以施展其他種類的技能
我想要讓他在戰鬥時能夠更換裝備或武器
請問該從哪裡設置呢?
感謝幫忙~

Lv2.观梦者

Adam

梦石
0
星屑
688
在线时间
841 小时
注册时间
2010-8-24
帖子
2595
2
发表于 2012-4-15 08:30:13 | 只看该作者
只能把物品变成装备公共事件
嘛,摸了。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
341 小时
注册时间
2013-6-15
帖子
45
3
发表于 2013-8-22 14:22:50 | 只看该作者
雖然已經過期了,但是我還是回答一下吧,用這個腳本就可以了
#==============================================================================
#
# ▼ Yanfly Engine Ace - Command Equip v1.01
# -- Last Updated: 2012.01.10
# -- Level: Easy, Normal
# -- Requires: n/a
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-CommandEquip"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.10 - Compatibility Update: Ace Battle Engine v1.15+
# 2011.12.13 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This command allows your actors to be able to change equipment in the middle
# of battle by directly accessing the equip scene in the middle of battle, and
# returning back to the battle scene exactly as it was. Furthermore, you can
# limit how frequently your player can switch equipment for each of the actors.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================

module YEA
  module COMMAND_EQUIP
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Battle Equip Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This is just how the text appears visually in battle for your actors and
    # how often they can change equips in battle.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    COMMAND_TEXT   = "装备"      # Text used for the command.
    EQUIP_COOLDOWN = 2            # Turns to wait before re-equipping.
   
  end # COMMAND_EQUIP
end # YEA

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

#==============================================================================
# ■ SceneManager
#==============================================================================

module SceneManager
  
  #--------------------------------------------------------------------------
  # new method: self.force_recall
  #--------------------------------------------------------------------------
  def self.force_recall(scene_class)
    @Scene = scene_class
  end
  
end # SceneManager

#==============================================================================
# ■ Game_Battler
#==============================================================================

class Game_Battler < Game_BattlerBase
  
  #--------------------------------------------------------------------------
  # alias method: on_battle_start
  #--------------------------------------------------------------------------
  alias game_battler_on_battle_start_ceq on_battle_start
  def on_battle_start
    game_battler_on_battle_start_ceq
    reset_equip_cooldown
  end
  
  #--------------------------------------------------------------------------
  # new method: reset_equip_cooldown
  #--------------------------------------------------------------------------
  def reset_equip_cooldown
    @equip_cooldown = 0
  end
  
  #--------------------------------------------------------------------------
  # alias method: on_turn_end
  #--------------------------------------------------------------------------
  alias game_battler_on_turn_end_ceq on_turn_end
  def on_turn_end
    game_battler_on_turn_end_ceq
    update_equip_cooldown
  end
  
  #--------------------------------------------------------------------------
  # new method: update_equip_cooldown
  #--------------------------------------------------------------------------
  def update_equip_cooldown
    reset_equip_cooldown if @equip_cooldown.nil?
    @equip_cooldown = [@equip_cooldown - 1, 0].max
  end
  
  #--------------------------------------------------------------------------
  # new method: battle_equippable?
  #--------------------------------------------------------------------------
  def battle_equippable?
    reset_equip_cooldown if @equip_cooldown.nil?
    return @equip_cooldown <= 0
  end
  
  #--------------------------------------------------------------------------
  # new method: set_equip_cooldown
  #--------------------------------------------------------------------------
  def set_equip_cooldown
    @equip_cooldown = YEA::COMMAND_EQUIP::EQUIP_COOLDOWN
  end
  
  #--------------------------------------------------------------------------
  # alias method: on_battle_end
  #--------------------------------------------------------------------------
  alias game_battler_on_battle_end_ceq on_battle_end
  def on_battle_end
    game_battler_on_battle_end_ceq
    reset_equip_cooldown
  end
  
end # Game_Battler

#==============================================================================
# ■ Window_EquipCommand
#==============================================================================

class Window_EquipCommand < Window_HorzCommand
  
  #--------------------------------------------------------------------------
  # overwrite method: handle?
  #--------------------------------------------------------------------------
  def handle?(symbol)
    if [:pageup, :pagedown].include?(symbol) && $game_party.in_battle
      return false
    end
    return super(symbol)
  end
  
end # Window_EquipCommand

#==============================================================================
# ■ Window_ActorCommand
#==============================================================================

class Window_ActorCommand < Window_Command
  
  #--------------------------------------------------------------------------
  # alias method: make_command_list
  #--------------------------------------------------------------------------
  alias window_actorcommand_make_command_list_ceq make_command_list
  def make_command_list
    window_actorcommand_make_command_list_ceq
    return unless @actor
    return if $imported["YEA-BattleCommandList"]
    add_equip_command
  end
  
  #--------------------------------------------------------------------------
  # new method: add_equip_command
  #--------------------------------------------------------------------------
  def add_equip_command
    text = YEA::COMMAND_EQUIP::COMMAND_TEXT
    add_command(text, :equip, @actor.battle_equippable?)
  end
  
end # Window_ActorCommand

#==============================================================================
# ■ Scene_Battle
#==============================================================================

class Scene_Battle < Scene_Base
  
  #--------------------------------------------------------------------------
  # alias method: create_actor_command_window
  #--------------------------------------------------------------------------
  alias create_actor_command_window_ceq create_actor_command_window
  def create_actor_command_window
    create_actor_command_window_ceq
    @actor_command_window.set_handler(:equip, method(:command_equip))
  end
  
  #--------------------------------------------------------------------------
  # new method: command_equip
  #--------------------------------------------------------------------------
  def command_equip
    Graphics.freeze
    @info_viewport.visible = false
    hide_extra_gauges if $imported["YEA-BattleEngine"]
    SceneManager.snapshot_for_background
    actor = $game_party.battle_members[@status_window.index]
    $game_party.menu_actor = actor
    previous_equips = actor.equips.clone
    index = @actor_command_window.index
    oy = @actor_command_window.oy
    #---
    SceneManager.call(Scene_Equip)
    SceneManager.scene.main
    SceneManager.force_recall(self)
    #---
    show_extra_gauges if $imported["YEA-BattleEngine"]
    actor.set_equip_cooldown if previous_equips != actor.equips
    @info_viewport.visible = true
    @status_window.refresh
    @actor_command_window.setup(actor)
    @actor_command_window.select(index)
    @actor_command_window.oy = oy
    perform_transition
    $game_system.battle_bgm.play
  end
  
end # Scene_Battle

#==============================================================================
#
# ▼ End of File
#
#==============================================================================

评分

参与人数 1星屑 +80 收起 理由
Sion + 80 感谢帮忙

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-20 12:32

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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