- Joined
- Feb 22, 2008
- Messages
- 619
Angle Between Points + Facing Angle = ?
I'd like it to have the following effect:
EDIT:
Unit A is the unit I care more about. I pay attention to his Facing Angle. I want to know Unit B's values relative to Unit A.
How many degrees does Unit A have to turn to the left to be facing Unit B (no negative values allowed)? That's what I'd like My_Variable to be.
-
Set Unit_Point = (Position of My_Unit)
-
Set Other_Units = (Units within 600.00 of Unit_Point)
-
Unit Group - Pick every unit in Other Units and do (Actions)
-
Loop - Actions
-
Set My_Variable = ?
-
-
I'd like it to have the following effect:
-
Set My_Variable to 0 if Picked Unit is directly ahead of My_Unit
-
Set My_Variable to 90 if Picked Unit is a 90° turn to the left of My_Unit
-
Set My_Variable to 180 if Picked Unit is directly behind My_Unit
-
Set My_Variable to 270 if Picked Unit is a 90° turn to the right of My_Unit
EDIT:
Unit A is the unit I care more about. I pay attention to his Facing Angle. I want to know Unit B's values relative to Unit A.
How many degrees does Unit A have to turn to the left to be facing Unit B (no negative values allowed)? That's what I'd like My_Variable to be.
Last edited: