Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to i make a working volume slider
- 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
this is what i coded from now but i wanna make it work how?
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)
- BeepBeepImaSheep010
-
Scratcher
23 posts
How to i make a working volume slider
what why
also your a beginner as i see i dont trust u
(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
what i did is i created a variable called “volume” and right click it and selected sliderIt's easy!
-snip-
this is what i coded from now but i wanna make it work how?
when green flag clickedNow whenever you use a Play Sound block, the loudness of the music will change by the slider.
set [volume slider v] to (100)
forever
set volume to (volume slider) %
end
// Try this!You can also right-click on the slider again and choose "Set slider Min and Max" to change what numbers you can set.
play sound [meow v] until done
Last edited by jettypumpkin07 (Aug. 22, 2020 08:14:38)
- BeepBeepImaSheep010
-
Scratcher
23 posts
How to i make a working volume slider
what i did is i created a variable called “volume” and right click it and selected sliderIt's easy!
-snip-
this is what i coded from now but i wanna make it work how?when green flag clickedNow whenever you use a Play Sound block, the loudness of the music will change by the slider.
set [volume slider v] to (100)
forever
set volume to (volume slider) %
end// Try this!You can also right-click on the slider again and choose "Set slider Min and Max" to change what numbers you can set.
play sound [meow v] until done
what to you mean by saying “Now whenever you use a Play Sound block, the loudness of the music will change by the slider.”
- Discussion Forums
- » Help with Scripts
-
» How to i make a working volume slider