Reply to Re: Shoot in any direction (almost)
If you don't have an account, just leave the password field blank.
Did you take a look at my script here? It also shoots in 32 directions, it just doesn't calculate an angle. So no advanced trigonometry there.
If you want to use sp_move_x() and sp_move_y() it doesn't really pay off to use advanced trigonometry since sp_move_x() and sp_move_y() only take integers anyway. So using all kinds of complicated sine/cosine functions really doesn't add much in terms of accuracy.
If you're interested, the final boss in my contest entry uses my enemy shoot system. It has been changed a little bit from the version I posted before to round numbers rather than truncate them. All this interest in enemy shoot systems almost encourages me to release my own as a development file. (In fact, I might...
)
EDIT: Also, in spite of the system calculating directions based on a square rather than a circle the angles aren't too far off, so in practice these values for &move_x and &move_y could probably be used with satisfying accuracy.

If you want to use sp_move_x() and sp_move_y() it doesn't really pay off to use advanced trigonometry since sp_move_x() and sp_move_y() only take integers anyway. So using all kinds of complicated sine/cosine functions really doesn't add much in terms of accuracy.
If you're interested, the final boss in my contest entry uses my enemy shoot system. It has been changed a little bit from the version I posted before to round numbers rather than truncate them. All this interest in enemy shoot systems almost encourages me to release my own as a development file. (In fact, I might...

EDIT: Also, in spite of the system calculating directions based on a square rather than a circle the angles aren't too far off, so in practice these values for &move_x and &move_y could probably be used with satisfying accuracy.
&move_x: | &move_y: | Angle: | Desired angle: 4 | 0 | 0 | 0 4 | 1 | 14.0 | 11.25 4 | 2 | 26.6 | 22.5 4 | 3 | 36.9 | 33.75 4 | 4 | 45 | 45 3 | 4 | 53.1 | 56.25 2 | 4 | 63.4 | 67.5 1 | 4 | 76.0 | 78.75 0 | 4 | 90 | 90