playMaker

Author Topic: Play Random Sound through Audiomixer  (Read 949 times)

Zswag

  • Playmaker Newbie
  • *
  • Posts: 9
Play Random Sound through Audiomixer
« on: March 25, 2019, 10:36:46 AM »
Hello.

I have a quick question that I been googling around for an answer without success. I have all my background music run through a audiomixer that works perfectly.

Now I would like all my sound effects to do the same. I have a character that swings a sword. Right now I use the action "Play Random Sound" to randomize between 3 different swing sound effects. I can't found anywhere to choose that they would be played through a audio mixer.

Is there a way to "play sound through audio mixer" or something like that?

(Or maybe I have misunderstood the whole thing of how audio mixers work)

Thanks a bunch!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Play Random Sound through Audiomixer
« Reply #1 on: March 26, 2019, 03:54:32 AM »
Hi.
Audio mixer are like channels.

there are some random audio actions on the Ecosystem

But what i usually do is :
Have an array with the audio sounds, then use Array Get Random (optional set 'No Repeat' so that same sound can not play 2x in a row)

Or i use 'Random Weighted Int' (on Ecosystem)
and then 'Array Get' and use the result of the int as index.
this way you can control if some sound shoul be played more often than the other.

Then i use 'Audio Play' with the result as One Shot Clip variable.