Controlling the volume of soundSlot

Dear forum,

I am trying to script a volume to fade over time and it seems to not be working. I went on the tutorials but there is nothing that deals with this. I added a soundSlot component to a model, and I have targeted it with code.

There are not, as far as I can tell, methods for updating the volume on a soundSlot. There is the volume property, but hitting that with code does nothing.

Any advice would be greatly appreciated.

There’s a volume param on the slot:

And also one on the emitter:

Example here:

@yaustar I looked at that example and for some reason, I am not able to see my instances in my entity.sound. Any thoughts?

Can you share the project please?

I can’t because it is commercial and I would need to get NDA’s from the client. It works fine in a demo, but with everything else going on it is not recognizing the instances.

So I noticed that you can not get the instances if autoplay is not set to true. Any ideas why that would be?

Can you create a small public project with the same problem?

Chances are that the instances are only allocated/created on first play/when playing?

I made another model with a sound component and it worked just fine in the project. Is it possible to have too many sound slots?

@yaustar thanks for your help. It was just buggy. I added it to another model and it worked just fine. Go figure.

Hmm. How odd.

To answer your earlier question, I think there is a limit on the number of simultaneous sounds you can play at any one time that’s is defined by the hardware/browser.