FMOD Scatter Intrument help for group of Enemies

Hi everyone,

I have trouble using Scatter instrument for a large group of enemies.

My enemies can be described as drones, their movement is physic based and there are quite a lot of them. Due to their physic behavior, they tend to group themselves quite naturally and I don’t have any actor being “the center” of the swarm, as every drone as its own movement behavior.

I am trying to design a spatialized sound that triggers when they are close to the player. After some research I found that Scatter Instrument seems to be the solution, however I have some problems in the implementation.
So now I have created an event with a scattered Instrument in it :

In my drone code (I’m currently using blueprints), I am checking the distance to the player and playing this event if the distance is lower than a threshold, the event is stopped if the condition is not met.

This method seems to work fine but I got issues with audio kind of jumping from time to time as if the CPU was overloaded or something and I don’t get why. (This problem with audio has never happened before)

Am I doing something wrong ?

Cheers,

Lou

I’m afraid we don’t have enough information about your project to identify the cause of this issue. have you tried connecting to your game using live update and checking your project’s CPU consumption in the profiler window?

Are any of the audio assets used in the scatterer instrument set to stream? You can check in the assets tab. If any are, try setting them to not stream.

Thank you for your response ! The problem came from the stream option !

I’m glad to hear you were able to resolve the issue.

If you’re curious why this method oworked to solve the issue, it’s because each playing stream requires constant, uninterrupted disk I/O to continue playing correctly. Most platforms support only a limited amount of disk I/O per unit time, however, so if too many streams are playing at once, they will not be able to read the date they need from disk in time, and so will not be able to play it. Setting the assets to not stream ensures that they were loaded into memory in their entirety, allowing them to play without consuming disk I/O.