Hey there. I haven't posted for a loooong time. BUT, I'm making something (again) and I really need a hand. I went through about 70 of the forum pages looking for the answer I need, but I can't quite seem to find anything I'm looking for, so my question is this.

How can I make it so that if the player is WITHIN a certain distance of the enemy, the enemy say... For simplicity rotates. Like, WITHIN -10 of it's x and +10 of it's x. The WITHIN part is very important, hence the capitalization. If someone could help me out here, it would be very much appreciated. (I've been stuck on this for about 5 hours now. So it's probably really easy, but I can't get it at all.)

Thanks in advance.