• 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.

How to get the future position of an unit?

Status
Not open for further replies.
Level 1
Joined
Oct 30, 2004
Messages
5
In my map, there is an alchimist walking around a square. Below that square, an unit shoots at the alchimist. The missile does not follow the alchimist's movement, it can be only targeted at points. But: When the missile impacts, it should exactly hit the alchimist!

So the unit has to shoot at the position of the alchimist that he will have when the missile arrives. To know that position, I need to know the time between missile spawn and impact... and you get the time with:
Distance between missile start point and target point / Missile speed (700)

So I can only know the time that the missile will fly if I know the shoot distance! But to know the distance, I need to know the time!
:( Does someone have a solution maybe?
 
Level 8
Joined
Apr 3, 2004
Messages
507
Test the projectile speed and movement speed in a simple map, and try to find one that crosses the distance in an easy-to-track time, like one second. Figure out what the conversion would be between the speed and the distance, and then you have your coefficient.
 
Status
Not open for further replies.
Top