Project1

标题: 嗯,如果说我只要武器动画用齐时,能不能这样设置呢? [打印本页]

作者: 幽月    时间: 2008-6-13 17:29
提示: 作者被禁止或删除 内容自动屏蔽
作者: 柳之一    时间: 2008-6-13 19:50
  1. if equip.id>0 and equip.id<100
  2.     def update_phase4_step3
  3.      # 行动方动画 (ID 为 0 的情况下是白色闪烁)
  4.      if @animation1_id == 0
  5.        @active_battler.white_flash = true
  6.      else
  7.        @active_battler.animation_id = @animation1_id
  8.        @active_battler.animation_hit = true
  9.      end
  10.      # 对像方动画
  11.      for target in @target_battlers
  12.        target.animation_id = @animation2_id
  13.        target.animation_hit = (target.damage != "Miss")
  14.      end
  15.      # 移至步骤 4
  16.      @phase4_step = 4
  17.     end
  18.    end
复制代码


晕,虽然不知道楼主具体要什么效果。
不过,好像代码不能这样写。感觉上怪怪的。


   def update_phase4_step3
    if equip.id>0 and equip.id<100
     ………………
    end
   end
顺序要这样写。

作者: 幽月    时间: 2008-6-13 19:53
提示: 作者被禁止或删除 内容自动屏蔽
作者: 灯笼菜刀王    时间: 2008-6-14 03:48
最简单的办法

在要后放的技能动画前面全加上和使用动画相等的空白桢。用全体复制,很容易调整。
作者: 幽月    时间: 2008-6-14 23:59
提示: 作者被禁止或删除 内容自动屏蔽
作者: 这LINK不劫狱    时间: 2008-6-15 00:05
提示: 作者被禁止或删除 内容自动屏蔽
作者: 幽月    时间: 2008-6-15 00:08
提示: 作者被禁止或删除 内容自动屏蔽
作者: 幽月    时间: 2008-6-21 04:33
提示: 作者被禁止或删除 内容自动屏蔽
作者: 电子最终龙    时间: 2008-6-21 04:58
首先在Scene_Battle里面找到这句
@active_battler.current_action.kind = 0
代表意思是角色行动类型为0,包含攻击防御两种
一般情况下防御没动画的,所以仅仅用这个变量来判定是否行动为攻击就可以
然后

齐时的原理就是行动方与对象方精灵同时执行动画.
也就是在执行主回合(phase4)里面的行动方动画(step3)和对象方动画(step4)
而默认脚本里这两个步骤是以@phase4_step这个变量来控制,在update_phase4这个函数里面调用.
要达成同时播放的效果,我们只需要在update_phase4调用的某个函数里同时调用update_phase4_step3和update_phase4_step4这两个函数,然后把@phase4_step直接跳到5
具体修改如下:

搜索到:
#--------------------------------------------------------------------------
  # ● 刷新画面 (主回合步骤 3 : 行动方动画)
  #--------------------------------------------------------------------------
  def update_phase4_step3
    # 行动方动画 (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 = 4
  end

把@phase4_step = 4删掉,改成
if @active_battler.current_action.kind == 0 #这个是普通攻击的标记
  update_phase4_step_4 #直接执行步骤4
else
  @phase4_step4
end [LINE]1,#dddddd[/LINE]系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~




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