# "Future position" of target of missile system projectile

#### Herod

Level 12
So, I´ve used missile splash to archers to attack enemies units, so if micro is made the shoot of the archer is missed cause the missile is splash.

but if the enemy is moving in line the archer will shoot in a "calculate" future position.

I need know if is possible do this using missile system projectile, cause even a unit is moving, the projectile is shoot in the actual position of target unit.

#### Uncle

Warcraft Moderator
Level 65
You can use the Point with polar offset function to get a Position offset by a Distance towards a Direction. So you could use this to fire the missile ahead of the target. You could either use the target's facing angle as the direction if you want to fire the missile where the target is currently heading, or you can use the angle between the missile source and the target as the direction to extend the total distance the missile travels regardless of the target's facing angle. It depends on how you want it to work. Then you would set the Distance to whatever value you think will work well to "calculate the future position".

• Set Variable Distance = 200.00
• Set Variable Angle = (Facing of MissileTarget)
• Set Variable Point1 = (Position of MissileTarget)
• Set Variable Point2 = (Point1 offset by Distance towards Angle degrees)
Point2 would be 200 range in front of the target. The front would be the direction the target is facing. So assuming the target is moving, and that they'll keep moving in that same direction, this would help compensate for that. It's tough to get the calculations perfect since distance and missile speed all play a part in the calculation.

Last edited:

#### Herod

Level 12
You can use the Point with polar offset function to get a Position offset by a Distance towards a Direction. So you could use this to fire the missile ahead of the target. You could either use the target's facing angle as the direction if you want to fire the missile where the target is currently heading, or you can use the angle between the missile source and the target as the direction to extend the total distance the missile travels regardless of the target's facing angle. It depends on how you want it to work. Then you would set the Distance to whatever value you think will work well to "calculate the future position".

• Set Variable Distance = 200.00
• Set Variable Angle = (Facing of MissileTarget)
• Set Variable Point1 = (Position of MissileTarget)
• Set Variable Point2 = (Point1 offset by Distance towards Angle degrees)
Point2 would be 200 range in front of the target. The front would be the direction the target is facing. So assuming the target is moving, and that they'll keep moving in that same direction, this would help compensate for that. It's tough to get the calculations perfect since distance and missile speed all play a part in the calculation.
Ok I will try this, but:
1) the move speed (of the enemy target unit)
2) The distance of Archer and target
3) Missile speed

is not taken into account?

Last edited:

#### Uncle

Warcraft Moderator
Level 65
You could take that into account I suppose, just factor it in when calculating the Distance variable. The slower the unit, the less Distance needed.

Replies
1
Views
244
Replies
1
Views
406
Replies
21
Views
3K
Replies
1
Views
733
Replies
9
Views
754