Custom Volume Slider Bar

0 favourites
From the Asset Store
slide the tiles to fill the board.60 awesome levels.
  • Yes, the link works, but your project is not in a good order.

    You need to name your variables properly. "Variable4" is not a proper name.

    You need to add two image points to the SliderBar - "start" and "end". In event 3 you need to set volume to tag "menu music", not to empty tag "".

    Just try to be more careful when copying things from tutorials into your project and you'll not have to wait a month for someone to help you.

  • Thank you so much! The slider works now, but one more issue:

    I am on the main menu, and my music is playing. Normal. I click on the Options button and go to the options menu, but the music self-pauses. Strange. When I move the slider, the music resumes and the volume changes along with the slider and it becomes normal again. Even more strange.

    I tried doing System > On start of layout > Audio > Resume, but that didn't work. Note that I was adding Audio > Resume to a System > On Start of Layout that I already had set up.

    I can update the file and give another link. I am storing the file on my desktop and every time I save I just replace the old file.

    Thanks again.

  • Music does not stop when you switch layouts, so it's no need to resume it. The problem is with the "setVolume" function or the slider. The function doesn't work correctly and music volume is set to silent.

    You need to set variable4 before calling the function on start of the layout. Otherwise you divide by 0 and nothing good can come from it.

  • Thank you SO much for spending all this time helping me! It's FINALLY working! Now all I need to do is add that to the sound effects slider bar that I have and then figure out some other things to put on the options menu - like the screen resolution setting - and then I'll FINALLY be done with my options menu! Thanks so much again!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I really hate to say it, but one last thing. I have multiple sounds and multiple music tracks for my game. My sliders only control one tag. I could label all my sounds and musics by one single tag but it says that tags are used to reference sounds/musics in the future, and doing that might mess things up.

    Is there any way I can have a group of sounds/music and then just set my sliders to control all sounds in the groups?

    Thank you SO much again.

  • You can create two variables - SoundsVolume and MusicVolume. When starting playing any sound, set its volume to SoundsVolume. When starting playing music - set its volume to MusicVolume.

    So when the sliders are changed, you save new sound/music volume in these variables, and can also set music volume for currently playing music.

    If you don't need to play several music tracks at once, it's OK to have one tag for all music in the game. But of course for different sounds it's recommended to have different tags.

  • Ok, thank you SO much!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)