1 Attachment(s)
Enemy Ship A.I. Trying to get the A.i. to broadside the player
So as the title tells I'm trying to get my enemy ships to get at the right angle to fire on the player. Right now I have a decent way of them to get to the player and turning, but two things are giving me trouble. The speed of the turning is too fast and a weird flip shake motion when the directions are near 0 and 32. I got a similar circumstance of the latter when working on turrets and I used angles for it and used Abs(((TargetAngle-TankAngle+540) mod 360)-180) <= 45 which I got from this post http://community.clickteam.com/threads/63931-Impairing-turret-angle?highlight=turrets .
I thought the ship movement would be easier so I wouldn't have to use angles but its looking that way so far. Unless is there a method for direction values similar to angles? The formula I used because of a blind spot in the targeting when the ship was at a certain angle. If I need an entirely custom movement so be it. I just don't know how to move an object along its angle yet so I wanted to use the bouncing ball movement so I could learn that later. I have scattered knowledge of programing and this too. So please forgive me if appears I know some stuff but not others.
Thanks for your time and I do have an example of what I'm doing