Difference between revisions of "Angle"

From WikiManual
Jump to: navigation, search
m
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
 
Place the desired co-ordinates onto the stack first then this function will remove them both and place the calculated angle onto the stack.  
 
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 .aim store
+
  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.
 
This will store the angle between where a bot is currently and the target co-ordinates, [1000,1000], into aim.
Line 9: Line 9:
 
A use for this in combat is to calculate the exact angle required to aim at an enemy. The code:
 
A use for this in combat is to calculate the exact angle required to aim at an enemy. The code:
  
  *[[.refxpos]] *[[.refypos]] angle [[.aim]] store
+
  *[[.refxpos]] *[[.refypos]] angle [[.setaim]] store
  
 
Will enable amazingly precise attacks.
 
Will enable amazingly precise attacks.
 +
 +
{{Advanced Commands}}

Latest revision as of 11:33, 27 June 2014

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.

Advanced Commands:

angle
dist
ceil
floor
sqr pow
pyth

The following commands are not supported in versions earlier 2.46:

anglecmp
root
logx
sin
cos