Returns the angle in degrees that is formed between a Bot object's direction and the direction to a specified object.
object expression.AngleTo (Object)
object expression Required. An object expression that evaluates to an object in the Applies To list.
Object Required VObject. An object of type Bot, Cell, or VPoint.
The AngleTo method returns a negative angle if object is to the left of the current heading and a positive angle if object is to the right of the current heading.
When the Bounds property of the Screen object is set to wrapped mode, the calculated angle to an object is along the shortest of all possible paths after accounting for wrapping around each of the Screen display edges.
The following example uses the AngleTo method to turn a Bot object in the direction away from another Bot.
angle = Bot.AngleTo(OtherBot)
Bot.Turn angle+180. 'turns away from OtherBot