Project1

标题: 怎么修改攻击与被攻击的动画顺序. [打印本页]

作者: jhhuang    时间: 2008-3-16 09:08
标题: 怎么修改攻击与被攻击的动画顺序.
我的游戏是先发动攻击敌人,然后再发动自己动画的....怎么改成先动画,再攻击? [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 禾西    时间: 2008-3-16 09:12
Scene_Battle 4
  #--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 4 : 行动方动画)
  #--------------------------------------------------------------------------
  def update_phase4_step4
    @spriteset.visible = false
    # 行动方动画 (ID 为 0 的情况下是白色闪烁)
    if @animation1_id == 0
      @active_battler.white_flash = true
    else
      @active_battler.animation_id = @animation1_id
      @active_battler.animation_hit = true
    end
    # 移至步骤 4
    @phase4_step = 5
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 3 : 对像方动画)
  #--------------------------------------------------------------------------
  def update_phase4_step3
    # 对像方动画
    for target in @target_battlers
      target.animation_id = @animation2_id
      target.animation_hit = (target.damage != "Miss")
    end
    # 限制动画长度、最低 8 帧
    @wait_count = 8
    # 移至步骤 5
    @phase4_step = 4
  end
[LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
作者: jhhuang    时间: 2008-3-16 09:31
是这样吗?好像还是一样....


  #--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 4 : 行动方动画)
  #--------------------------------------------------------------------------
  def update_phase4_step4
    # 行动方动画 (ID 为 0 的情况下是白色闪烁)
    if @animation1_id == 0
      @active_battler.white_flash = true
    else
      @active_battler.animation_id = @animation1_id
      @active_battler.animation_hit = true
    end
    # 对像方动画
    for target in @target_battlers
      target.animation_id = @animation2_id
      target.animation_hit = (target.damage != "Miss")
      #.......................................................................
      if target.is_a?(Game_Actor)
        ##############
        if target.guarding?
          $fangyu = 1
       end
        ##############
       if target.current_action.kind == 0 and target.current_action.basic == 1
           target.setup_battler_ani(target.battler_name.split(/★/)[2])
        else
         target.setup_battler_hurt_ani(0)
        end
      end
      if target.is_a?(Game_Enemy)
        if target.current_action.kind == 0 and target.current_action.basic == 1
          target.setup_battler_ani(target.battler_name.split(/★/)[1])
        else
          target.setup_battler_hurt_ani(0)
        end
      end
      #.......................................................................
    end
    # 对像方动画
    for target in @target_battlers
      target.animation_id = @animation2_id
      target.animation_hit = (target.damage != "Miss")
      #......................................................................
    end
    # 限制动画长度、最低 8 帧
    @wait_count = 8
    # 移至步骤 5
    @phase4_step = 5
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 3 : 对像方动画) ★
  #--------------------------------------------------------------------------
  def update_phase4_step3
    # 限制动画长度、最低 8 帧
    @wait_count = 8
    # 移至步骤 5
    @phase4_step = 4
  end
end
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● 取得战斗画面的 X 坐标
  #--------------------------------------------------------------------------





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