One sound ON, another sound OFF when enter in a building

First of all… “Hello!

Second, I have a question about a particular case, with:

  • one terrain;
  • one “cylindrical building” surrounded by a “circular pool”;
  • one sound of “outdoor ambient” (birds, wind);
  • one sound of “water”;
  • one sound of “indoor ambient”.

What is your approach to achieve these scenes:

  • when entering the building, outdoor ambient’s sound - OFF, and an indoor ambient’s sound - ON;
  • when exit the building, indoor ambient’s sound - OFF, and the outdoor ambient’s sound - ON?

For all of that, “trigger” it’s the FPScontroller.

Thank you in advance for an idea / solution!

Have a nice day!

I’m not a programmer

I found a possibility, but the code it’s obsolete (from 2010), not working in Unity 5:

	var Sound1 : AudioClip;
    var Sound2 : AudioClip;
   function Start()
{
audio.Play(Sound1);
}


 function OnTriggerEnter(other:Collider)
    {
if(other.gameObject.tag == "Cladire")
{
audio.Pause(Sound1);
audio.Play(Sound2);
}
}


function OnTriggerExit(other:Collider)
{
if(other.gameObject.tag == "Cladire")
{
audio.Pause(Sound2);
audio.Play(Sound1);
}
}

The code it’s from @jesus-freak : Audio Play/Stop Trouble - Questions & Answers - Unity Discussions