• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How to get the future position of an unit?

Status
Not open for further replies.

ButterflyCaught

B

ButterflyCaught

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?
 
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.
Back
Top