|
Post by hipsterdufus on Nov 22, 2021 16:36:35 GMT
Hello, I am wondering if you can help me with a use case I have. Let's say in my game the player can make a small fire. When the fire is created it starts a fire crackling sound attached to the transform that is looping. I'd like to limit the number of voices to 3 for this sound so that if the player creates 10 fires they are not all playing the same sound effect at once. That works fine but if the player creates 10 fires and then stops the first 3 he created none of the remaining 7 fires will have any sound coming from them. I'm wondering if there's a simple way to deal with this situation? Thank you.
|
|
|
Post by DarkTonic Dev on Nov 22, 2021 19:41:12 GMT
There are lots of ways to do that, but none of them will handle if you stop one of the fires that is audible. You will be back to 2 voices at that point.
If you use the Ambient Sound script, it may work. But it's playing only the sounds that are close enough to be heard and not the others. For example if you're out of range of the other 7, they won't be playing. Then you stop one (in range) and it's 2 again. Once you move enough where another is in range, it will start playing again.
Let me know if that works.
-Brian
|
|