Alright the forums have probably seen this question asked a thousand times a thousand ways but here's the code
if (distance_to_object(objlink) < 90) // Or however close you want the enemy to start moving
{
image_single = -1;
move_towards_point(objlink.x, objlink.y, 3); // Set 3 to the speed you want the enemy to move
}
else
{
image_single = 0;
speed = 0; // This stops the enemy from moving
}
alarm[1] = 30; // Reset the alarm
I don't want the enemy running through solid objects as it chases Link around. I need the enemy to stop when it comes into contact with solids.
Ive looked over the help file with no luck. Thanks