Angle

From WikiManual
Revision as of 23:41, 26 April 2008 by Mbd (talk | contribs)
Jump to: navigation, search

This calculates the angle between a bot's current co-ordinates and another location.

Place the desired co-ordinates onto the stack first then this function will remove them both and place the calculated angle onto the stack.

1000 1000 angle .setaim store

This will store the angle between where a bot is currently and the target co-ordinates, [1000,1000], into aim.

A use for this in combat is to calculate the exact angle required to aim at an enemy. The code:

*.refxpos *.refypos angle .setaim store

Will enable amazingly precise attacks.