I have a trigger that changes my camera into a new scene. My current code for the background music is this:
It's very simple. I would like to use my trigger to turn off this music and start another. That doesn't seem too difficult, it's when I leave that trigger. I would like to keep the main Background music and have it turn on again when you exit the trigger, and turn off the trigger music. (so toggle them.)
This is what I have so far, but I'm not sure if I'm on the right track.
I'm fairly new to this but I hope this was enough information. Please help!
I know exactly what you want. Checkout the question about audio. You might also want to see the script reference on OnTriggerExit
So you can do something like.
Just make sure you have an audio listener attached to your player.
May I ask where I would put this code please? I am looking for something very similar :)
Many thanks, Adam
answered Jul 16 '11 at 03:31 PM