Hello, I’ve got this situation with which I could use help
In our RPG game, every enemy has a set of hit reaction, attack and death voice sounds. What I would like is to limit the number of voice sounds playing to 1 for each enemy actor/entity. The reason for that is if the enemy is making a long “heavy attack” roar and during that the player kills it, the creature is doing two voice sounds at one moment.
My half-working solution: All voice sounds are triggered through animations in UE4. So I’ve decided to put all sounds into one event and in each animation, I trigger the correct sound using a parameter voiceType. I’ve put all voice sounds in multi instruments underneath each other in one track in Fmod event. Each multi instrument has a voiceType parameter condition to play. In Fmod it works perfectly. If I switch the value of voiceType parameter, the ongoing sound stops and new one starts. In game, it doesn’t work at all. Since all voice sounds are triggered from animations, every time the sound is triggered it creates a new instance of Fmod event.
So I thought - if it would be possible to code a limit of one Fmod instance per one actor in UE4, then this solution might work. (I’m trying to do as much as possible inside Fmod without needing a programmer support, since we’re limited by programmer’s time.)
Do you think that this will work and it is possible to limit instances of Fmod event per actor?
Or any ideas on how to do it differently?
We’re using UE 4.24 and Fmod 2.00.07