Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: ToxicFrog on December 03, 2018, 09:27:08 PM
-
Hi Playmakers,
I need to have a 'Flashbang' effect (like in Counterstrike). When the player is hit by a particular explosion I need all the audio to immediately go silent, while a ringing effect is the only thing that can be heard.
Over a few seconds, the ringing audio will gradually decrease down while the regular audio gradually increases back up to normal.
There must be a simple way to turn all audio down except for a specific audio source, then turn all audio back up once the effect has worn off.
Any recommendations?
Thanks!
-
Hi,
well, for this I think you'll need a proper sound system framework to allow for easy controls of sounds by group.
Master Audio is probably the best choice, and it has PlayMaker support. I would enquire with the author to check that what you want is feasible.
https://assetstore.unity.com/packages/tools/audio/master-audio-aaa-sound-5607
else, the custom way would be to fire a global event "FLASH BANG STARTED" so that many fsm can react and lower the volume of their respective audio, and then "FLASH BAND END" for audio to resume to regular volume, that would work too.
Bye,
Jean
-
I don’t know how to do this, but I know the technical term is “ducking”:
https://en.wikipedia.org/wiki/Ducking
Master Audio has “audio ducking”, lowering the volume of other sounds while one sound is active, though I never used it. But Unity appears to have it built-in, (https://docs.unity3d.com/Manual/AudioMixer.html) too, see tutorial below.
Unity Tutorial:
https://unity3d.com/learn/tutorials/topics/audio/duck-volume-audio-effect
-
Both great suggestions - thank you very much!
-
Hi,
ok cool, I learned something! thanks Thore :) I am so behind with audio... I never use it in real projects...
Bye,
Jean