1
Programming Questions / Re: AI Question
« on: December 18, 2016, 03:12:46 PM »You could use the built in gravity_direction to have the desired behaviour.
Set the gravity in the create event, and in the step event have the line:Code: [Select]with(objPlayer)
other.gravity_direction=point_direction(other.x,other.y,x,y);
So that the acceleration of your object is always pointing towards the player.
If you don't want said object to get too far away from the player I suggest also putting a cap on its speed.
This worked surprisingly well! Thanks!