Two questions to long for title

ok i know the title is stupied but its true my questions are to long.

  1. can I make it so if my enemy is in a certin range it plays certine whipering (creepy) sounds
  2. can I also make it so if my flashlight (spotlight) shines on my enemy it disapers and stops the sound or makes it louder
    3.thanks in advance if you can help people

Yes and yes. Quite simple thanks to Unity.

This will just be pseudocode, but it should work

Assume target as a Transform type. This script is attached to the player.
if Vector3.Distance(transform.position, target.position) < 20 //assume 20 meters within range
then Play creepy sound. Place sound on target. Send a message and have the target contain a function which receives a signal when to play this sound.

Use a spotlight and modify it to your liking then put it in front of this flashlight object. Then create a RayCast pointing out of the flashlight point to check for collision and if the collision hits this “monster” tag, meaning our target, then have the script call the target’s play sound function and increase the sound or w/e. You can make the functions unique by passing in parameter for how loud or change in frequency. For this look up RayCast and HitRayCast in the Unity docs.