**SOLUTION:**(SOLVED) Using Global Variables in expressions - #2 by ZeroX4
So i’m making a volume adjustment system in my game.
I made two global variables. one for music, one for sound.
In the options menu, when you adjust the volume for music or sound, it increases or decreases the value of the global variable (MusicVolume or SoundVolume)
Now Each and every scene in my project has a link to external events called “Volume Logic”

Now here’s the problem:
What I wanted was to set the volume of each sound channel to the value of the corresponding global variable. However, it won’t let you do that, only allowing Array & Structure Variables…
So what I had to do was this for Music Volume, which was fine, since music is only on one channel
However, Sound Effects are stored on 24 DIFFRENT SOUND CHANNELS. I did this because most of these sounds come from enemies & hazards, like cannons, which there are alot of. I did this to have it check to see if their sound was already being played, so, per say, multiples units of the same enemy firing at once don’t all play the same sound overlapping, as that would probably blow the player’s eardrums out.
If I had to do what I did for the music, it would take a painstakenly long time to to add actions that adjust the volume for each sound channel, for EACH SOUND VOLUME VARIABLE VALUE.
It would look this this, but multiplied by 10 (For each volume). ![]()
Why can’t global variables be used in expressions?![]()
There’s gotta be an easier way to do this…











