From Game Editor
Revision as of 00:32, 4 May 2011 by Skydereign (Talk | contribs)
double direction(double x1, double y1, double x2, double y2);
direction returns the angle (in degrees) between point (x1,y1) and (x2,y2).
Example:
Create a homing bullet that locks onto the player.
bullet -> Draw Actor -> Script Editor
angle=direction(x, y, player.x, player.y);