How do I set the volume of music?

Get help using Construct 2

Post » Thu Feb 19, 2015 11:21 pm

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.
B
8
S
1
Posts: 54
Reputation: 824

Post » Fri Feb 20, 2015 12:10 am

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.
B
8
S
1
Posts: 54
Reputation: 824

Post » Fri Feb 20, 2015 12:19 am

The music folder works for me so I don't know what happens in your project. :(
B
72
S
21
G
12
Posts: 314
Reputation: 12,111


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 10 guests