playMaker

Author Topic: Set Random Audio Clip  (Read 3619 times)

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Set Random Audio Clip
« on: March 20, 2015, 01:44:56 PM »
So, in the latest release of Unity 5 you can see that all the audio has been changed from automatically being 3D to 2D which makes all One shot audios pointless in a 3D game (if you know how to change the settings, let me know!) There is an action for Play Random sound. How about a Set Random Audio Clip? Just add it in and use the audio play action to play the sound.
« Last Edit: March 20, 2015, 03:41:20 PM by sebaslive »
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

terrorOfNewDelhi

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Set Random Audio Clip
« Reply #1 on: March 25, 2015, 02:53:48 AM »
Useful, thanks.
Some guys modified the PlayRandomSound action to include the spatial setting. This could also be a useful alternative.
http://hutonggames.com/playmakerforum/index.php?topic=9812.msg46624#msg46624

I'm also considering making a custom action that allows you to create a new AudioSource component, assign audio settings, and store that in a variable. You could use this to create multiple AudioSources on a single gameobject at Awake, then refer to them easily within the FSM to Play or adjust settings such as pitch.
Will be my first time creating a custom action though, so might take me some fiddling...

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: Set Random Audio Clip
« Reply #2 on: March 25, 2015, 07:38:25 AM »
Excellent, thanks for this and good luck with the action. I am still trying to get the hang of it.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez