• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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,243
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: 80
Status
Not open for further replies.
Top