Here's a follow up.
1) Create a instance variable for the enemy called "sightrange" - give it a default value like 20 (in the properties field on the left)
2) add new event
for the action choose "enemy sprite" - set value
Then in the next dialog box pick your variable "sight range"
Now create a new event
system - compare instance variable
pick "sight range"
and change the expression to "<" (less than)
and where it says 0 right now, change it to distance(self.x, self.y, player.x, player.y)
substitute "player" for whatever your called your player sprite.
Then in the action for this new event put something like "set animation" to "attack"
or whatever you want your enemy to do when the player is close
now each time the player gets with whatever "sight range" default value you give it, it will execute those actions