playMaker

Author Topic: how to play random sound from audio source game object? [SOLVED]  (Read 1124 times)

Fleech

  • Playmaker Newbie
  • *
  • Posts: 44
i have dialog i wanted to randomly play out of the location of enemy NPC's. currently i have to use "play random sound" with a wait timer that's as long as the longest clip of audio that i have because play random sound has no "wait for end of clip" option, and the "play random audio" action does not play the sound from the origin of the game object the audio source is on. is there any other way to set this up.
« Last Edit: October 30, 2019, 02:36:03 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: how to play random sound from audio source game object?
« Reply #1 on: October 29, 2019, 02:40:49 AM »
Hi,

have you tried this advanced audio play action? it has a finished event: https://hutonggames.com/playmakerforum/index.php?topic=11596.0


 Otherwise: you likely want to use a proper sound manager plugin for this, have you looked for one on the asset store? some sound systems have so much gems like you might find that you can do your logic with very little effort nor programming. So it's totally worth spending some time studying the various solutions available before trying to do that yourself manually.

Bye,

 Jean

Fleech

  • Playmaker Newbie
  • *
  • Posts: 44
Re: how to play random sound from audio source game object?
« Reply #2 on: October 29, 2019, 09:27:23 AM »
this accomplishes what i needed it to, thanks. i was using "play audio advanced" which i wasn't able to get working, i didn't see they were 2 similarly named actions.