How do I custom vol slider. GET VOLUME X

0 favourites
  • 8 posts
From the Asset Store
slide the tiles to fill the board.60 awesome levels.
  • I want to set slider X to volume, but can only set to master volume but I want music volume, and volume to be 2 different things, and I think master volume will turn off music as well.

    How do I get volume.X to put my slider at?

  • =/

  • I'm not sure I understand correctly. You want for example the sound fx and music play at different levels?

    If so, then keep the master volume at db 0 and don't use a slider for that.

    Instead, create 2 sliders that each one will control one of the 2 categories (fx or music). Whenever you trigger a new sound, pass the corresponding slider value into its "Volume" parameter.

    ex:

    Play "MyMusic" looping at volume Slidermusic.Value

    Play "MyFX" not looping at volume Sliderfx.Value

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thats no good, i dont want to use slider bar, i want to make my own custom slider bar that looks good . I cannot retrieve volume to get the X coordinates to put slider at, when i set X to audio.volume it says i need another parameter.

  • Ah, now I get it. You can't just put the X value as the volume though. You have to convert it first

    I did an example

    https://dl.dropboxusercontent.com/u/14855413/volumeslider.capx

    There's probably a better formula, but basically what it does is to translate the X position of the slider sprite to db.

    Substitute 525 to the maximum X your slider sprite can travel and 250 to the difference between max X and min X.

    -50 is the volume at which I hear no sound. Put it to a lower value if you still hear some sound (I'm 41 so I already started having hearing difficulty )

  • I have my slider graphics, and the slider button slides with it, but when I make the default sliderbar invisible it does not work anymore even when it is enabled. Has ANYONE made custom volume slider bar? or are you all content with using the ugly construct one?

    Howcome every time I ask a question it's like I am the only one trying to do that particular thing?

  • If I understand right, you made a custom sliderbar that slides together with a default sliderbar, right?

    In my example above there's no need for a default sliderbar, you just put your custom graphics and that's it. Were you able to download the capx?

  • You are setting the volume with the Square but not vice versa. I will need to display the box AT the current volume.

    Also doesn't master volume control sounds, and music? I think I just want volume.

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