查看: 2310|回复: 3

[已经过期] 有某个状态后,被打时怎么显示一个动画?

[复制链接]
梦石
0
星屑
381
在线时间
238 小时
注册时间
2013-8-20
回帖
410
发表于 2018-5-11 08:55:43 | 显示全部楼层 |阅读模式

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

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

×
就是附加某个状态后。
被打后显示特定动画再损血。
请问在battle场景脚本哪里改
不定期回来6R玩。
↓下方广告帖,欢迎点击
梦石
0
星屑
42235
在线时间
6017 小时
注册时间
2006-11-10
回帖
6966
发表于 2018-5-11 13:52:23 | 显示全部楼层
有些说明不清楚

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

那在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
回复

使用道具 举报

梦石
0
星屑
8498
在线时间
775 小时
注册时间
2017-11-10
回帖
1074
发表于 2018-5-12 12:04:11 | 显示全部楼层

  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
复制代码

不过会发生一些比较奇怪的事情。
建议再做个伤害大小的判断...
一个只会简单事件的Rm新人,脚本完全不懂。只求做个简单的游戏完成自己的游戏之梦而已。
第一个游戏已经完成,等待各素材的完成和测试。
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部