gabriel
New Member
Posts: 29
Posts: 29
|
Post by gabriel on Sept 18, 2015 11:49:45 GMT
We're making a pool (billiards) game and I was just looking for some advice on how to do what I'd like to with Master Audio. Basically, I want certain sounds to play depending on how hard the balls/rails/pockets are hit. So, if the ball/rail/pocket is hit hard, it would play the "hard" version (along with variations) of sounds I have queued up, if medium then the "medium" versions, and if lightly then the "light" versions. Any advice on how best to go about this? Hopefully, I'm making myself clear. Thanks!
|
|
|
Post by DarkTonic Dev on Sept 18, 2015 15:16:06 GMT
This will take code for sure.
I would either make several different Sound Groups, or Variations within a Sound Group, for the different hit sounds. Then add code to play 1 of several Sound Groups depending on the amplitude of the force detected. Since you're making your own script, decorate the variable in the Inspector with SoundGroupAttribute so you can choose Sound Groups from a dropdown instead of copy/paste. Like this:
[SoundGroupAttribute] public string SoftHitSound;
[SoundGroupAttribute] public string HardHitSound;
|
|
gabriel
New Member
Posts: 29
Posts: 29
|
Post by gabriel on Sept 19, 2015 16:55:28 GMT
Ok, thanks! I'll set up the sound groups and ask one of the devs in my studio to help with this. "When the ball/bumper/pocket is hit hard/med/light, make it so that Master Audio plays *this* Sound Group." That sounds doable, right?
|
|
|
Post by DarkTonic Dev on Sept 19, 2015 20:00:21 GMT
Yep, quite easy most likely.
|
|