light sound sensitive AI

I want my character to only be able to see my character in light. I also want it to react to light by finding the light source and if it hears a noise it will search for the source. I have no idea where to begin with this can someone help me.

Well a start with seeing in the light is this:

if(Vector3.Distance(transform.position, light.position) - light.range >= 0) {



With the sound:

for(var sounds in FindObjectsOfType(AudioSource)) {

if(Vector3.Distance(transform.position, sounds.position) - sounds.maxRange >= 0) {




Any questions, please ask!