Project1

标题: 有某个状态后,被打时怎么显示一个动画? [打印本页]

作者: 白魔导师宝儿    时间: 2018-5-11 08:55
标题: 有某个状态后,被打时怎么显示一个动画?
就是附加某个状态后。
被打后显示特定动画再损血。
请问在battle场景脚本哪里改
作者: 灯笼菜刀王    时间: 2018-5-11 13:52
有些说明不清楚

如果是要“中了某状态后,受到任何攻击都显示特定动画”

那在scene battle4,步骤4里
target.animation_id = @animation2_id  这里用个 if 套起来就好了
栗子
if target.states.include?(XXX)
  target.animation_id = XXX
else
  target.animation_id = @animation2_id
end
作者: 文雅夕露    时间: 2018-5-12 12:04

  1. class Scene_Battle
  2.   #--------------------------------------------------------------------------
  3.   # ● 刷新画面 (主回合步骤 5 : 显示伤害)
  4.   #--------------------------------------------------------------------------
  5.   def update_phase4_step5
  6.     # 隐藏帮助窗口
  7.     @help_window.visible = false
  8.     # 刷新状态窗口
  9.     @status_window.refresh
  10.     for target in @target_battlers
  11.       if target.damage != nil and target.damage.is_a?(Numeric)
  12.         target.ad_pop = true if target.damage > 0
  13.       if target.state?(状态id)
  14.       target.animation_id = 动画id
  15.     end
  16.    end
  17. end
  18. end
  19. end
复制代码

不过会发生一些比较奇怪的事情。
建议再做个伤害大小的判断...




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