|
Post by anappgames on May 16, 2019 23:28:01 GMT
Hey guys.
So i am using Master Audio for all audio in my game.
Now this is more of an "best" pratice issue than a real support issue but i was hoping to get some help on the matter.
In my game i have a lot of different characters (both male and female). I then have a few sound groups such as: Male_A_Attack, Male_A_Death, Male_A_Damaged and the same for male / female A -> D
Now my goal here is to make some kind of implementation towards the API that ensures me that Character #1 only uses Male_A_? sounds and that Character #2 only uses Male_B_? sounds.
my question is how can i achieve this easily? is there potentially a smart way to group these sounds that i dont know off?
i am thinking that i can't be the first to have this issue so i am hoping someone might be able to help me.
Thank you in advance.
|
|
|
Post by DarkTonic Dev on May 17, 2019 1:12:56 GMT
Do you only play one character at a time? If so, make a "sound skin" for each character, with the Dynamic Sound Group Creator script. And put it on that character's prefab, so when they spawn, those Sound Groups are available in Master Audio, and only until they despawn. You will be able to name the Sound Groups more generically like "attack 1", "jump" etc, and always play the appropriate sound for the character without adding all sounds for all characters into Master Audio. Now, if you need more than one character making sounds at the same time, you still might want to use DSGC's (if you select from a large list) just so you don't have to create hundreds of Sound Groups, which would take up tons of audio memory. Let me know if you need more help.
|
|
|
Post by anappgames on May 17, 2019 11:27:11 GMT
So the goal is that i have multiple characters that should be bound to different voices:
Character 1 can only use Male_A voices while character 2 can only use Male_B voices. i think that the DSGC is the thing i need but i am not sure how i can do this from code? How should i set it up to make sure that the character gets the correct voice and doesnt suddenly use a wrong voice type? And how can i call that from code?
|
|
|
Post by anappgames on May 17, 2019 11:43:21 GMT
in short.
How can i make sure character A only uses Male_A sounds and how can i make sure my Character B only use Male_B through code?
|
|
|
Post by DarkTonic Dev on May 17, 2019 15:18:19 GMT
I can't answer your questions until you answer mine. Again, Will there only be one of these characters playing the game at any one time?
If there's only one, you can name the sound groups generically. If there's more than one you will need to name them uniquely and add some sort of logic to get the correct sound group name to play in your controller code based on the character making the sound.
You could potentially get around that by firing a custom event and having your character listen to that custom event and play the appropriate sound group for them.
|
|