|
发表于 2011-4-16 07:42:15
|
显示全部楼层
至于楼主的另外一个问题,下面这段触发可以实现机枪兵命中目标后回当前攻击间隔15倍的血的效果。
[trigger]
WeaponDamage
Events
Environment - Player Any Player uses Effect Marine - Guass Rifle (Damage)
Local Variables
life = 0.0 <Real>
Period = 0.0 <Real>
Caster = (Triggering Effect Unit(Caster)) <Unit>
Conditions
(Triggering Effect Amount (Real)(Damaged, false)) > 0.0
Actions
Variable - Set life = (Caster Life (Current))
Variable - Set Period = (Unit Weapon Speed(Caster, 1))
Variable - Set life = (life + (Period * 15.0))
Unit - Set Caster Life to life
[/trigger]
实现注册好武器对应的伤害效果。另外SC2里的闪避是用将伤害减为0实现的。因此就加个伤害>0判断是否命中吧。 |
|