Difference between revisions of "Angle"

From WikiManual
Jump to: navigation, search
 
m (gen edit)
Line 1: Line 1:
angle
+
This calculates the angle between a bot's current co-ordinates and another location.
  
Calculates the angle between my co-ordinates and two other co-ordinates.
+
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
 +
 
 +
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:
  
Place the desired co-ordinates onto the stack first then this function will remove them both and place the calculated angle onto the stack.  
+
*.refxpos *.refypos angle .aim store
(1000 1000 angle) will store the angle between where I am now and the target co-ordinates, [1000,1000], onto the stack. Then I can use the new value to show me which direction to head in.
+
 
 +
Will enable amazingly percise attacks.

Revision as of 18:30, 26 December 2005

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 .aim 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 .aim store

Will enable amazingly percise attacks.