Hello, I have a car game I’m making, you know that. So, when I go into reverse, I want the AudioSource to change. Any ways of doing this?
Sure, just tell it to activate the sound on another audio source. One GameObject can have multiple AudioSource components.
How do I do that?
Add the audio sources and name them or reference them how you like.
I’m confused.
Well, then you need to read up on components. You can add multiple AudioSource components, which you should do. Then set up your script to use them. I’m not going to write your code for you, this is pretty basic stuff and I have other plans at the moment. If you have the sense to set up multiple WheelColliders and access them, it’s quite similar. Use an array, use unique names, as long as you and your script can reference them, it’s fine.
Well I’m stuck too and the kep files don’t help. Carking have you solved this? I have one gameobject with 2 audiosources attached to it. But there seems to be no way in script to get one or other of the two components. The are both called ‘Audio Source’ I know how to getcomponentinchildren but how do you do it with 2 components of the same name?