There is probably a lot of different methods, heres two I use though.
First you use an invisible sprite that is bigger than your player sprite and then set its position to your player. Then you give your enemies commands that once they are "overlapping" the sprite that their speed will be reduced to 0, stopping them.
Another way is with the distance checks. For example your condition could be; Distance(player.x, player.y, monster.x, monster.y < your desired distance you want them to stop. And then the action could be again to set the speed to 0.
Just remember if you want them to start running again once you move away - then you need to tell them what to do as well. IE, invert the condition and set the speed to their regular speed again.