- Joined
- Mar 30, 2013
- Messages
- 180
This is passive, it updates whenever the said unit is issued an order
What i want is
-P1 (Unit Location), P2 (Order Location), P3 (Engaged Unit Location)
R1 Is Angle from P3 to P1
R2 Is Angle from P3 to P2
If R2 is Less than (R1+90) and Greater than (R1-90) Then add the moment speed (Done via a item ability)
So my problem stands in that, my math is shite as you can probably guess, and that Angle between points gives a value between 180 and -180 not 0 and 360
Anyone know a better way to do this?
TL;DR, Want to create a spell when the unit is running away from the engaged unit, angle between points doesn't give me the values i need so idk what to do
What i want is
-P1 (Unit Location), P2 (Order Location), P3 (Engaged Unit Location)
R1 Is Angle from P3 to P1
R2 Is Angle from P3 to P2
If R2 is Less than (R1+90) and Greater than (R1-90) Then add the moment speed (Done via a item ability)
So my problem stands in that, my math is shite as you can probably guess, and that Angle between points gives a value between 180 and -180 not 0 and 360
Anyone know a better way to do this?
TL;DR, Want to create a spell when the unit is running away from the engaged unit, angle between points doesn't give me the values i need so idk what to do