Point Towards (x,y)
A simple script that allows a sprite to point towards a co-ordinate (x,y).
How does it work?
dy and dx are the differences between the co-ordinate and out sprites co-ordinates. dy/dx here acts as finding the value of the opposite/adjacent. We could also do sqrt(dy^2 + dx^2) to find the exact distance to the point also.
Then we turn through the angle of atan(dy/dx) to point towards the co-ordinate.
To cut down on variables, you can replace myx and myy with xpos and ypos.