I will be giving the answer assuming that your sprites were designed this way (with the front side up):
The origin of sprites is middle center and bottom center, respectively.
obj_Enemy - Create Event:
cone=instance_create_depth(x,y,-5,obj_Cone);
cone.owner=self();
obj_Enemy - Step Event:
direction=point_direction(x,y,mouse_x,mouse_y)-90;
seno=dsin(point_direction(x,y,mouse_x,mouse_y));
cose=dcos(point_direction(x,y,mouse_x,mouse_y));
- -90 is for the values to match. It may vary according to the way your sprites were designed.
obj_Cone - Draw Event:
draw_sprite_ext(spr_Cone,0,owner.x+(20*owner.cose),owner.y+(-20*owner.seno),1,1,owner.direction,c_white,1);
- 20 was a value that I stipulated as suitable for my tests, it may be the value that you want in your game.
obj_Cone - Collision with Player Event:
direction=point_direction(x,y,obj_Player.x,obj_Player.y); //For the enemy to turn to the player
...
rest of your code
...
At range/distance you can use the following code in the enemy's step event:
if(distance_to_object(obj_Player)<=300){
}else{
}
But if you prefer you can do something like this, for different distances:
See above, that there are 3 different cones, with green being the smallest and red being the largest. That is, there would be 3 cone objects. You would do the same process for everyone.
For the player not to notice this, they just need to be the same color.