A_Look2
From ZDoom Wiki
A_Look2
(no parameters)
Looks for players or other attackable actors in the game. This function is similar to A_Look but it only reacts to sound. Just seeing the player won't wake up a monster using this. This function must be used in the idle states of a monster.
The 3 states after this function call are reserved. You must include these states because the function jumps to the states following the call. A_Look2 calls them randomly to animate actors using this function. The third of these states is only called when the STANDSTILL flag is not set.
If you don't need that, A_TurretLook is the better solution.
Examples
Some of Strife's actors use this to check for gunfire. Here is code taken from the Peasant.
Spawn: PEAS A 10 A_Look2 Loop
As you can see it is very similar to the A_Look example.

