Discuss Scratch
- Huckleberry256
- Scratcher
100+ posts
Change Slider Min/Max with scripts
3.0 mock up:I was thinking something similar, although I was thinking of having the min and max be separate blocks:
set [variable v] slider min to [0] :: variables
set [variable v] slider max to [100] :: variables
I guess I could further stretch the idea by adding a way to find out what the min/max is:
(min slider range of [variable v] :: variables)
(max slider range of [variable v] :: variables)
(If you're interested, double-click and press shift and down arrow to see the rest of my signature.)
I'm Huckleberry, your average video game enjoyer and developer. Minecraft, PvZ, and Brawlhalla fan, among other things. Music nerd. Proponent of and haver of dry humor.
if I'm ever on the forums, I'll usually be on the Help with Scripts forum so you might see me there every now and then
see my profile to see what I'm up to I guess
over 2 stacks of posts
Some of my best projects can be found here: https://scratch.mit.edu/studios/27944298/
wow Shgloopy
- Lerconn_Games
- Scratcher
96 posts
Change Slider Min/Max with scripts
Changing slider Min/Max with scripts can look something like this but in orangeset slider min [Frogs v] to [3]
set slider max [Kittens v] to [12]
No support,it's only January so Scratch 3 will have slider maximum and minimum soon,you could use Scratch 2 or 1.4 to do that.
Otherwise,you'll have to wait for a-while.
@plit234 However, it was never a feature for scratch 2.0, it is for other projects where you want to change slider min/max multiple times in one project.
It was in the editor,look:
I don't find a use to change it multiple times,just set it to the highest you can go and then the lowest you can go and then use this script:when green flag clicked
forever
if <(foo) < (max)> then
set [foo v] to [4]
end
if <(foo) > (minimum)> then
set [foo v] to [10]
end
end
it will be too much variable and then i think scratch will crash if you need lots of slider variable and need to change the max and min
Late, but what about a reporter
[min v] of [variable1 v] :: variables reporter
Last edited by Lerconn_Games (June 22, 2021 21:04:05)
Look above, read the actual post first! :)
go to [Scratch v] ::motion
forever {
change [number of good features v] by (1) :: variables
} ::control
- DarthVader4Life
- Scratcher
1000+ posts
Change Slider Min/Max with scripts
This topic has more discussion. However, this is older and both have very good points.-snip-
Late, but what about a reporter[min v] of [variable1 v] :: variables reporter
I'm reporting the linked topic to be merged with this one.
Be Moist Also, here's a helpful link to Ocular
I am DV4L, Erector of Text Walls, Typer of Long Posts, Creator of Mini-mod posts
The kumquats have eaten this line, so I have to have a new way to repel them.
Had a bad day or are feeling bored? Watch this to make your day better in an interesting way.
Do you think you've been banned unfairly? Then you'd be wrong. The ST aren't children, so quit acting like they are.
I am DV4L, Erector of Text Walls, Typer of Long Posts, Creator of Mini-mod posts
The kumquats have eaten this line, so I have to have a new way to repel them.
Had a bad day or are feeling bored? Watch this to make your day better in an interesting way.
Do you think you've been banned unfairly? Then you'd be wrong. The ST aren't children, so quit acting like they are.
- mitdk
- Scratcher
1000+ posts
Change Slider Min/Max with scripts
This is a dupe of a much larger topic:
https://scratch.mit.edu/discuss/topic/516871/
https://scratch.mit.edu/discuss/topic/516871/