HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to pull units to a line?

05-10-2009, 12:54 PM#1
Tyrande_ma3x
I have a spell that creates a long line and then picks units around it. How can I pull the units towards the center of the line? I already have the units picked around it (as well as the units' position, the starting point of the line and the ending one) but I have no idea how to do the maths and such...
Here's an image of what I'm trying to do:

Say, the red line is my line and the blue dots are the units.

And then I want to pull them to its center like this:


Suggestions?


EDIT: Nevermind, I found out the formula.