Can I make an entity point towards the player along one axis within a limited range?

Say, for example, I have a cylinder coming out of the ground with an arrow pointing out of it. I want the cylinder to turn and point at the player if he is within its range (45 degrees in either direction) and when the player leaves that range it stops trying to follow until he re-enters. I only want it to turn left and right, not on any other axis, otherwise I’d try to figure out some trick with a func_tank whose target is !player.

Any ideas?

Yeah, a func_tank.

How to func_tanks work?

[editline]16th March 2011[/editline]

Actually, i made an automatic turret before, and it did exactly what your aiming for. I’ll upload it later