My problem is that I simply use this:
Every tick
--- deer: set angle to (player.x, player.y)
--- deer: rotate clockwise 180 degrees
And use a collision box that turns the object when it collides, so it looks like it turns away from it.
The problem I'm having though is that when the object is moving away with the bullet movement every second you will see it turn backwards towards the player for a split second due to setting the angle to the player constantly and setting it away. I make it change it's angle -180 degrees towards the player, basically turning away. It looks like it's spazzing occassionally due to this. Another big problem is that when it runs into a wall it turns, and runs along the wall. Because of it constantly turning away from the wall and the player at the same time it is very spazzy and I need a way to stop it from turning away from the player while next to a solid.
What i'm using to alleviate this right now is a large collision box that constantly spawns around the running away object when it has detected you. When it comes in contact with a solid I set the instance variable for it's turning away from the player 'off'. The big annoyance is that there isn't else or an invert option for collision events so I can't simply make it turn the turning away from the player back on when it's away from the wall. Each object that is running away has everything tied to instance variables so they work seperately.
Any way to fix this spazzing out? Thanks.