Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: christianstrang on June 07, 2016, 06:24:48 AM

Title: Using action "Play Sound" volume is really quiet[SOLVED]
Post by: christianstrang on June 07, 2016, 06:24:48 AM
When I attach an audio source to a gameobject, the volume works correct, but if I play a sound through a "Play Sound" action or "Audio Play", the volume is really quiet, even though I have volume at 1.
I'm new to Playmaker so not sure if I miss something basic.

Im using Unity 5.3.4p3
Title: Re: Using action "Play Sound" volume is really quiet
Post by: christianstrang on June 07, 2016, 06:35:13 AM
Ok, I narrowed down the issue:
I have a state that has the following actions:

- Audio Play (or "Play Sound" doesn't really matter)
- Send Event
- Get Owner
- Destroy Object

In this case the volume is really quiet, but if I create an intermediate state with just the "Audio Play" (and a FINISHED transition to the other state), the volume is fine. If I instead use "Play Sound" the issue persists.

Can somebody let me know why this happens? I would prefer to have everything in one state, instead of having to create intermediate state just for the audio.
Title: Re: Using action "Play Sound" volume is really quiet
Post by: Gida on June 07, 2016, 06:57:34 AM
How do you play the Sound and which Version are you on?  :)
Title: Re: Using action "Play Sound" volume is really quiet
Post by: christianstrang on June 07, 2016, 07:10:50 AM
I'm using Unity 5.3.4p3 and I play the sound using the action "Audio Play" (though I have the same issue with "Play Sound"
Title: Re: Using action "Play Sound" volume is really quiet
Post by: 4ppleseed on June 07, 2016, 07:43:28 AM
I have this problem too. Since switching to U5, the audio is really quiet using Play actions
Title: Re: Using action "Play Sound" volume is really quiet
Post by: Gida on June 07, 2016, 07:48:11 AM
Problem is since V5 there is the option of the playing a "3D" Sound. Now the Volume depends on the Distance to the Listener i think. Since then there is the audio Mixer:

http://docs.unity3d.com/Manual/AudioMixer.html

You can try to uncheck the 3D Option there.

Or:  Create an empty GameObject with a FSM. Make a global event. Then attach the "Play Sound" Action to it. Start Runtime and press "Alt" + "LMB" on the Event..

This should sound loud and clear.
Title: Re: Using action "Play Sound" volume is really quiet
Post by: Gida on June 07, 2016, 07:53:57 AM
Sorry I was wrong. In U5:

MAke an empty GameObject and just import the Sound via Drag and drop to the scene. Attach  it to the GO as a child and deactivate it (the sound file).

Now you can activate it and it shall sound equally loud.
Title: Re: Using action "Play Sound" volume is really quiet
Post by: christianstrang on June 07, 2016, 08:11:01 AM
That seems to be working. I don't really like this solution though, as it complicates something that should just work.

I wasn't able to find an option to deactivate the 3d sound (I work with a 2d project, is it automatically deactivated there?). Could you let me know how to deactivate it, I would rather just use the "Play Sound" action without having to create a child gameobject that gets activated.
Title: Re: Using action "Play Sound" volume is really quiet
Post by: Gida on June 07, 2016, 08:20:59 AM
try in the import settings. I know its not the best solution but the quickest way around. You can try and attach your Sound source close to the Audio Listener??
Title: Re: Using action "Play Sound" volume is really quiet
Post by: christianstrang on June 07, 2016, 10:22:15 AM
I'm not sure where to change it for the import settings (please see the attachment) I tried mono but that didn't help.

Quote
You can try and attach your Sound source close to the Audio Listener??
I'm not sure what you mean by that, as I work in the 2d space, I'm not sure if this even applies to my situation.
Title: Re: Using action "Play Sound" volume is really quiet
Post by: dudebxl on June 07, 2016, 11:37:30 AM
Anybody tried playaudio advance on ecosystem?
Title: Re: Using action "Play Sound" volume is really quiet
Post by: christianstrang on June 07, 2016, 12:19:18 PM
I gave it a try and it didn't help with the sound issue, though for my situation it would be overkill anyway. The default play audio or play sound would be fine for my 2d-situation, if I could only increase the volume for it (the volume is fine if I don't use a playmaker gameobject).
Title: Re: Using action "Play Sound" volume is really quiet
Post by: dudebxl on June 07, 2016, 01:06:36 PM
Ok,cool... But as side note, with the action you can set the sound to 2d and you can control most the audio source elements. I had this problem and it was solved when you set audio source to 2d.
Title: Re: Using action "Play Sound" volume is really quiet
Post by: christianstrang on June 07, 2016, 02:09:52 PM
You are right, setting the spatial blend to 0 makes it 2d and then it works. This is actually a great alternative, considering you can just use the action without creating an additional gameobject that has to be set to active. A bit overkill for what I need, but will probably stick with it, thank you for the suggestion! :)