How do I set the volume of music?

0 favourites
  • 3 posts
From the Asset Store
10 Beautiful Pokemon-like Building Pixel Art Sprite Sets
  • I play looping music at -20 db with the tag "1b". I say 'every tick, set "1b" volume to 0db'. The volume is still -20db. Jesus christ, I'm trying everything but I just cannot get this horrible software to change the volume of a sound. Help, please.

    I started off with looping music that starts at -50db in one layout, then in the next layout the music's volume is set to the value of a global variable. The music track was supposed to get louder the longer the player is in the air, Portal-2-gel-style, so this variable decreases while the player is on the floor and increases otherwise.

    This didn't work, so I thought that either A. my variable isn't doing what it's supposed to or B. Construct 2 is forgetting about sound that started playing in a different layout. First I tried replacing 'set volume to the-variable db' with 'set volume to 0 db', which didn't have any effect.

    Then I tried starting the music on the same layout in which its volume is altered as opposed to starting it in the previous layout and then altering the volume in this layout. Didn't help.

    I'm out of ideas. If anybody knows why on earth Construct 2 wouldn't respond to the straightforward, "On start of layout play music at -20db, every tick set volume of music to 0db," please tell me.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • WAIT.

    I tried moving all the music into the sounds folder and now it works a dream. Apparently all those tantalizing audio actions like 'set volume' only apply to 'sounds', not 'music'. Very strange.

  • The music folder works for me so I don't know what happens in your project.

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