Handling lots of assets for a single actor

Hey,

So for our game, our character may find himself or herself among different environments. They can be on a grassy terrain, a wooden floor, a rock and more. These two types of ground surfaces can be within a few meters apart of eachother. When the player jumps and lands, we will play a sound. This landing sound will be dependant on the physics surface type, set up in the physics material of that ground.

This all nice and dandy, except for the fact that we’re not sure what the best way is to handle all these different sound assets. We can give the character actor a million UAudioComponents, one for each surface type. This sounds like a bad solution, as you will quickly lose the overview of other characters properties and code. Using a single audio component is also not ideal, because you can only set one sound at a time, and if you switch the sound while the other one is still player, it’ll play the newly set sound. The audio itself is positional as well, such that other players can hear the other player landing. Using a TMap of audio components is also no option, as that’s simply not supported by the engine.

So, what else would be a good idea in this situation? Is there some kind of asset management class I am aware of that I can use?

Thanks,

Shammah

Hello, maybe this thread will give you ideas to help you solve your troubles : Question about making radio? - Blueprint Visual Scripting - Unreal Engine Forums

i first thinked doing that to help :

&d=1404893379 / &d=1404909784

but there was mistake : sounds were continuing to play when new one was starting so we did :

&d=1404933119 and knack idea to use an array was added so one sound was playing at a time and could be selected from an array.

If you use the mistake of the first part so setting var, not set sound then you’ll can have 2 sounds at same time.

The other thing i thought is that the sound could be attached to each player with an attenuation so then when another player is near it will be heard without nothing to do …

Talking about that, i tried to help vlads79 with attenuation in this thread : Ambient Sound - Content Creation - Unreal Engine Forums if you know a bit more than me maybe you can help him solve his trouble too ^^