• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

How To Drag an Unit With the Missile Smoothly and With Friction

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,264
I have a bit of an issue with the spell that I am making. The missile would run past the unit without dragging it longer. What speed would you recommend for the Knockback speed so that this does not happen?
Any speed will work as long as you make sure to always drag the unit. If the missile is moved very fast you might need to use a big area search with a rectangle filter or multiple smaller area searches so that the searched area is continuous.

I would recommend latching units to the missile while they are being dragged as that avoids any "physical annoyances" that can occur with continuous application. An example of a physical annoyance could be a unit on unit collision knocking out the missile area and so stopping the drag.
 

sentrywiz

S

sentrywiz

You can make it based on how many units its dragging.

For example if it drags one unit, its speed would be faster rather than dragging five.

Like "Every Number of Units * 0.1 seconds"

Also you can check how far the unit is from the missile. If its more than X range, let's say 300 it will be dragged slower. The more its pulled towards the missile, the faster it gets.

Just my two cents on the matter.
 
Status
Not open for further replies.
Top