|
Post by dariuspranskus on Sept 6, 2019 7:36:18 GMT
Hello
I am very new to Master Audio, what I want to achieve is very simple behaviour. It is that for the particular event MA randomly plays a single clip from a group.
I took the following steps:
1. Using the Master Audio component I created a MA group and added two clips to it.
2. Then I created a custom event.
3. On my Prefab I added an Event Sounds component and created a Custom Event trigger.
4. In Code I just fire the event like MasterAudio.FireCustomEvent("PivotRotated", pivot.transform);
If I am in Play mode, when the event is fired, MA plays both clips, kind of in quick succession.
If I exit the play mode, and try sounds in editor, it plays fine.
What I need is it to play just a single randomly selected sound.
What might be an issue here?
Thank you.
|
|
|
Post by DarkTonic Dev on Sept 6, 2019 15:55:06 GMT
If it's playing clips one after the other, you must have set the Sound Group's "Variation Mode" to "Chained Loop"...can you check? Documentation here: www.dtdevtools.com/docs/masteraudio/SoundGroups.htmAlso, turn on "Log Sounds" for the Sound Group so the Console will tell you what is firing the play of the 2nd sound and send it to me if you can't figure it out. That is not the default behavior. Then, show me a screen shot of the Event Sounds trigger you set up just to make sure.
|
|
|
Post by dariuspranskus on Sept 6, 2019 21:37:19 GMT
Hi. Thanks for the clues. I have figured it out. I had attached the Event Sounds component to the one of my prefabs and I had multiple instances of it in my scene. When I was firing the event few of them where receiving it and playing the sound.
|
|
|
Post by DarkTonic Dev on Sept 6, 2019 21:47:04 GMT
That makes sense. Thanks.
|
|