Set all audio tags to a specific volume?

Get help using Construct 2

Post » Thu Oct 01, 2015 2:09 pm

I'm in the process of making my audio settings system for the options menu. Standard stuff, volume 0 to 100 %. I've gotten this to work with music just fine, since all music in the game uses the same tag ("Music"). However I want a seperate volume setting for all the sound effects which has the sounds folder as source, which has an uncountable number of different tags, and some have no tag at all. Is there a way to make sure all these sounds get affected by my volume correction without having to manually go in and include the math formula in every single audio command in the entire game?

I've tried to have an every tick command which applies the variable to an empty "" tag, though the results are unstable.

Edit: And no I don't want to touch master volume for this. I'm using that for something else.

Thanks
B
33
S
10
Posts: 377
Reputation: 3,195

Post » Thu Oct 01, 2015 2:54 pm

Tinimations wrote:I'm in the process of making my audio settings system for the options menu. Standard stuff, volume 0 to 100 %. I've gotten this to work with music just fine, since all music in the game uses the same tag ("Music"). However I want a seperate volume setting for all the sound effects which has the sounds folder as source, which has an uncountable number of different tags, and some have no tag at all. Is there a way to make sure all these sounds get affected by my volume correction without having to manually go in and include the math formula in every single audio command in the entire game?

I've tried to have an every tick command which applies the variable to an empty "" tag, though the results are unstable.

Edit: And no I don't want to touch master volume for this. I'm using that for something else.

Thanks

A way you could do it I guess. Would be to make a list/array or whatever you prefer, and whenever you create a tag you add it to the list. And then you just make a loop, and in the audio "tag" you use the tags from this list and adjust the volume for each tag. Guess that could work as you don't want to use the master as you said.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Thu Oct 01, 2015 4:19 pm

I ended up researching some regex and replaced the code in the xml files with a script. Turned out to be the most efficient way.
B
33
S
10
Posts: 377
Reputation: 3,195


Return to How do I....?

Who is online

Users browsing this forum: dop2000, totoe and 41 guests