• 🏆 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!

"Future position" of target of missile system projectile

Level 12
Joined
Oct 28, 2019
Messages
478
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 64
Joined
Aug 10, 2018
Messages
6,570
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:
Level 12
Joined
Oct 28, 2019
Messages
478
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:
Top