Sound help?

I have a campfire sound, i put an audio source on the campfire, set the sound, checked loop, unchecked play on awake.
How do I make it play but only hear it when ur getting closer, and as you get closer it gets louder?

Since it’s an Audio Source, it should get loader and loader, the closer to the campfire you get…
But, you can use a trigger to turn it off and on, if you want…

I cant hear it though… ill mess with the volume

Check the play on awake thing maybe ?

ok i turned the volume down, put play on awake on and it worked, is there i can make it only play when you enter a certain area, like make a cube and do it?

Nevermind all i had to do was turn the rolloff up.
Got to love the reference :slight_smile: Thank you Unitiy

Make a cube, uncheck the Mesh Renderer, and then set the Collider to Is Trigger…
Then attach this script to your player…

var AudioSource : GameObject;

function OnTriggerEnter ( other : Collider ) {
if other.gameObject.name == "Name_Of_The_Trigger") {
AudioSource.AudioListener.volume = 0.5;
}
}

function OnTriggerExit ( other : Collider ) {
if other.gameObject.name == "Name_Of_The_Trigger") {
AudioSource.AudioListener.volume = 0.0;
}
}

Or something like that…

Oh, ok =)