How do I use sliders to save a value between layouts?

0 favourites
  • 4 posts
From the Asset Store
Photo Slider Puzzle with unlimited no of grids & pieces
  • I was making my game and wanted to use sliders to control the music and SFX. I saved the value onto a global variable and used that value as the sound for the music and SFX but it didn't work. what do I do?

  • Sorry if I wasn't clear

    so I have 2 slider bars 1 for sound effects and 1 for music

    I set the minimum to 0 and the maximum to 40

    then I made a variable to keep track of the value of each of the slider bars

    then I made the volume of the music and SFX to their variable -20

    it didn't work

    PS the slider bars were in a different layout then the level with the sound

  • If the variable is setting correctly then there is nothing wrong with the slider bars. Check that the variables you are using are Global Variables, and that your event sheet for each layout sets the volume to those variables.

    You could even use a separate event sheet for the volume control and 'include' it in all your other layouts.

    EDIT: Also when dealing with volume in decibels (dB) inside Construct 0dB is the maximum volume. So you want to set your minimum and maximums in the negative. Minimum: -99 Maximum: 0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the info:)

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