2019-04-06 00:19:39

I have a track playing using the normal sound function.
sound.load(path);
sound.play();
This function has sound.volume, but how do I adjust the volume?
//turn volume up.
if(key_pressed(KEY_UP)
sound.volume question mark
//turn volume down
if(key_pressed(KEY_DOWN)
sound.volume question mark

2019-04-06 01:06:48

Hi,

as the volume parameter does not have add or subtract method, you must do like this.

sound.volume=sound.volume+1
or
sound.volume=sound.volume-1

Hope this helps!

I've been going by Bryn, which is now reflected in my profile. Please do your best to respect this :) Mess ups are totally OK though, I don't mind and totally understand!
Follow on twitter! @ItsBrynify
Thanks, enjoy, thumbs up, share, like, hate, exist, do what ya do,
my website: brynify.me

2019-04-06 01:22:21

Ah, ok. Didn't think of that