playMaker

Author Topic: Having trouble getting slider to control the volume of music in Sample Scene  (Read 1961 times)

Mysterian

  • Playmaker Newbie
  • *
  • Posts: 9
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!


Bjakuja

  • Junior Playmaker
  • **
  • Posts: 75
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!!!

Mysterian

  • Playmaker Newbie
  • *
  • Posts: 9
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!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

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

bye,

 Jean