- Joined
- May 11, 2008
- Messages
- 22
I'm trying to make a special effect to play on a unit after it is hit by a missile. Problem is that I don't know how to time it such that the effects will occur exactly on impact.
It cannot be done simply with "event-unit is attacked" then "action-create special effect on attacked unit" since the "unit is attacked" event refers to the time the missile is launched and not when it actually hits the unit. What happens is that the special effect occurs when the missile has not yet hit the target. You can't just put a constant wait time since it will depend on the speed of the missile and the distance.
So how do you make the computation for the delay based on those?
If possible, a non-JASS solution...
It cannot be done simply with "event-unit is attacked" then "action-create special effect on attacked unit" since the "unit is attacked" event refers to the time the missile is launched and not when it actually hits the unit. What happens is that the special effect occurs when the missile has not yet hit the target. You can't just put a constant wait time since it will depend on the speed of the missile and the distance.
So how do you make the computation for the delay based on those?
If possible, a non-JASS solution...