- Joined
- Mar 27, 2008
- Messages
- 8,035
-
Set r = (Angle from TempLoc to TempLoc2)
Basically I want the r value to be calculated by using pure coordinates instead of locations.
I tried the Atan2 functions before and failed (maybe I was doing it incorrectly) and I know this is such a simple question for vJASS-er, thank you.
Tried this but I'm sure this is wrong lol:
-
Custom script: set dx = GetUnitX(udg_u2) - GetUnitX(udg_u1)
-
Custom script: set dy = GetUnitY(udg_u2) - GetUnitY(udg_u1)
-
Custom script: set udg_r = SquareRoot((dx*dx) + (dy*dy))