What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

TurnAngle and TurnDirectly.

Status
Not open for further replies.

CoalCloud

New Member
Joined
Oct 3, 2014
Messages
61
Reaction score
0
1) How can I get a more precise turn angle of the player?
TurnAngle only returns 0-127.

2) Can TurnDirectly be used to turn to specified x/y coordinates?
The closest method is TurnDirectly(SpawnObject).


If not it'll be good if these are added into the API.
 
1) How can I get a more precise turn angle of the player?
TurnAngle only returns 0-127.
*2,8125 = degrees.

Code:
private bool TurnToCoords(double X, double Y)
        {
            int myAngle = host.angle(host.me, X, Y);
            return host.Turn(-(myAngle / 180.0 * Math.PI), true);
        }
 
For some reason the when TurnAngle equals 0, the object is facing 28 degrees to the south of due east. You'll have to adjust the value by 28 if it matters to you.
 
Status
Not open for further replies.
Back
Top