Check the behavior I've attached below! I've used this behavior for a shooter game were the turret started firing if the player was in the range.
But be wary that you have to use some global and local attribute for it!
You need a game attribute of the X and Y of the hero or player and also you have to create a local attribute of Distance (or name what you like) to pass in the distance number!
Hope it help you!!!!
ps : it's the set Distance equation that you need!!!! And you only have to pass it to a draw method to show it on screen!