Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Mysterian on March 20, 2014, 06:42:21 PM

Title: Having trouble getting slider to control the volume of music in Sample Scene
Post by: Mysterian on March 20, 2014, 06:42:21 PM
Hello all!  I downloaded the pack of Sample Scenes located on the Tutorials page to get some hands-on training in with Playmaker.  The scene I am having trouble with is called audiotester.

In this scene, there are a pair of sliders that control the volume and rate of a heartbeat.  I was particularly interested in the volume slider since I am currently setting up an Options Menu for a side project.

I plugged in all the sample sounds, and they seem to work just fine when I press play, volume fades out when I slide the slider.  When I plug in an MP3 song though, the volume slider does not seem to change the volume at all. 

Are there different settings or actions that need to be added to handle music?  Any help would be much appreciated.  Thank you!

Title: Re: Having trouble getting slider to control the volume of music in Sample Scene
Post by: Bjakuja on March 21, 2014, 09:55:04 AM
Hi! What you can do to control your music volume is to create empty game object on scene, add audio source component and in inspector specify your desired music for that game object (note that music has to be set as 2D sound). Then add FSM component to that game object, create float variable (call it for example musicVolume), then add horizontal slider to that FSM State. For slider specify float variable to be your float variable yo just created, left value to be 0 and right value to be 1. After that add action Set Audio Volume and for volume specify your float variable to be every frame.
Hope this helps ;)

Cheers!!!
Title: Re: Having trouble getting slider to control the volume of music in Sample Scene
Post by: Mysterian on March 25, 2014, 04:35:44 PM
Unfortunately, I was still unable to get the music to fade in and out.  Sound effects work just fine.  For some reason the music files don't want to co-operate though.  Still troubleshooting!
Title: Re: Having trouble getting slider to control the volume of music in Sample Scene
Post by: jeanfabre on July 17, 2014, 02:11:29 PM
Hi,

 how is this going, have you been able to work it out yet?

bye,

 Jean