SetDistanceToUnit I think this is surprisingly useful. The "from" unit is the center of reference for setting the position of the "to" unit. The "dist" real is the distance to set between the units. So if you wanted a spell where a unit walks along pushing all units out of the way, you would, for each unit in "dist" range, call SetDistanceToUnit(pusher, pickedUnit, dist). JASS: function SetDistanceToUnit takes unit from, unit to, real dist returns nothing local real x=GetUnitX(to)-GetUnitX(from) local real y=GetUnitY(to)-GetUnitY(from) local real factor=dist/SquareRoot(x*x+y*y) call SetUnitX(to,GetUnitX(from)+x*factor) call SetUnitY(to,GetUnitY(from)+y*factor) endfunction Alternatively: JASS: function SetDistanceToXY takes real x, real y, unit to, real dist returns nothing local real tx=GetUnitX(to)-x local real ty=GetUnitY(to)-y local real factor=dist/SquareRoot(tx*tx+ty*ty) call SetUnitX(to,x+tx*factor) call SetUnitY(to,y+ty*factor) endfunction Hopefully this inspires some creativity.