• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Missile detection

Status
Not open for further replies.
Level 3
Joined
Aug 16, 2011
Messages
26
Is there a way to track when a missile hits the target. For example when you cast Death Coil and the green ball hits the target. Im worknig on a spell and the damage is dealt right at the casting of the spell but the missile takes time to get to the target and the spell doesn't look good.
I'm thinking the solution could be something like calculating the time it takes the missile to travel and dealing the damage then. I have the missile speel from the ability and I think you can get the distance between the caster and the target, but I can't get what the missile speed actualy means. 1500 what?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
I think you can get the distance between the caster and the target, but I can't get what the missile speed actualy means. 1500 what?

1500 distance units per second.

It's not possible to detect when the missile hits. You could develop a system that has high propability to detect it, but still not 100% sure unless you trigger all abilities yourself.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
You must[/b] use trigger for this situation, it's just unavoidable.

You can use a combination of dummies (using SetUnitX/Y) and detects it by using Picking Units in XXX AoE around a Unit Group.

Also, you said you were gonna use the formula Speed = Distance / Time, right ?
Well, it won't work since the target is not stationary and it will mess up the calculation if the target moves forward or backward, it will simply disobey the calculations

Here's a test map showing triggers can do to detect missiles (Death Coil)
 

Attachments

  • Simple Missile System.w3x
    14.4 KB · Views: 78
Status
Not open for further replies.
Top