Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Creating an On/Off Slider ?
- SparshG
-
Scratcher
500+ posts
Creating an On/Off Slider ?
I want to create an on/off slider so you can toggle trail.
I know how to do it but it shows 0 and 1.. Is there any way I can show “Off” and “On” on a slider instead of 0 and 1.. or do I have to find a workaround? Thanks
( https://scratch.mit.edu/projects/394152994/ )
I know how to do it but it shows 0 and 1.. Is there any way I can show “Off” and “On” on a slider instead of 0 and 1.. or do I have to find a workaround? Thanks
( https://scratch.mit.edu/projects/394152994/ )
- Oumuamua
-
Scratcher
1000+ posts
Creating an On/Off Slider ?
A workaround, a workaround…
If you want to use variable monitor just create another variable saying ON or OFF according to slider value.

If you want to use variable monitor just create another variable saying ON or OFF according to slider value.

Last edited by Oumuamua (May 14, 2020 06:39:24)
- SparshG
-
Scratcher
500+ posts
Creating an On/Off Slider ?
Wait so we are showing the slider ‘workaround’ to the user, so when the user changes its value, this won't work…coz this works if ‘s’ is changed…
- SparshG
-
Scratcher
500+ posts
Creating an On/Off Slider ?
Anyways I just created another variable that shows the value and overlaps the slider, it seamlessly works as great. Thanks!
- Discussion Forums
- » Help with Scripts
-
» Creating an On/Off Slider ?