Discuss Scratch

BeepBeepImaSheep010
Scratcher
23 posts

How to i make a working volume slider

Hello, i am Nick and i currently make a game called “Car driving simulator” i would like add a volume slider
what i did is i created a variable called “volume” and right click it and selected slider

when green flag clicked
set [Volume v] to [100]
if <> then

end

this is what i coded from now but i wanna make it work how?

Last edited by BeepBeepImaSheep010 (Aug. 22, 2020 06:03:02)

freshBOT
New Scratcher
59 posts

How to i make a working volume slider

not possible rn soz
BeepBeepImaSheep010
Scratcher
23 posts

How to i make a working volume slider

what why
(when it will be possible)

also your a beginner as i see i dont trust u

Last edited by BeepBeepImaSheep010 (Aug. 22, 2020 06:48:10)

jettypumpkin07
Scratcher
1000+ posts

How to i make a working volume slider

BeepBeepImaSheep010 wrote:

what i did is i created a variable called “volume” and right click it and selected slider
-snip-
this is what i coded from now but i wanna make it work how?
It's easy!

when green flag clicked
set [volume slider v] to (100)
forever
set volume to (volume slider) %
end
Now whenever you use a Play Sound block, the loudness of the music will change by the slider.
// Try this!
play sound [meow v] until done
You can also right-click on the slider again and choose "Set slider Min and Max" to change what numbers you can set.

Last edited by jettypumpkin07 (Aug. 22, 2020 08:14:38)

BeepBeepImaSheep010
Scratcher
23 posts

How to i make a working volume slider

jettypumpkin07 wrote:

BeepBeepImaSheep010 wrote:

what i did is i created a variable called “volume” and right click it and selected slider
-snip-
this is what i coded from now but i wanna make it work how?
It's easy!

when green flag clicked
set [volume slider v] to (100)
forever
set volume to (volume slider) %
end
Now whenever you use a Play Sound block, the loudness of the music will change by the slider.
// Try this!
play sound [meow v] until done
You can also right-click on the slider again and choose "Set slider Min and Max" to change what numbers you can set.

what to you mean by saying “Now whenever you use a Play Sound block, the loudness of the music will change by the slider.”
BeepBeepImaSheep010
Scratcher
23 posts

How to i make a working volume slider

Thank you its working

Powered by DjangoBB