Discuss Scratch

the2000
Scratcher
1000+ posts

Change Slider Min/Max with scripts

1492864 wrote:

What do I call it then?
I've heard people refer to those as “Scratchblocks mockups” before. I'd personally say that it counts as a mock-up. No one said it had to be an image, right?

PATSATDAT
Scratcher
1000+ posts

Change Slider Min/Max with scripts

3.0 mock up:
Huckleberry256
Scratcher
100+ posts

Change Slider Min/Max with scripts

PATSATDAT wrote:

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. PvZ and Minecraft fan, among other things. Nerd, especially in music. Generally a goofy human being.

usually I'll go 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/

Happy Scratching!
Lerconn_Games
Scratcher
96 posts

Change Slider Min/Max with scripts

mrtbts wrote:

plit234 wrote:

KittenDude172 wrote:

plit234 wrote:

KittenDude172 wrote:

Changing slider Min/Max with scripts can look something like this but in orange

set 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

Lerconn_Games wrote:

mrtbts wrote:

-snip-

Late, but what about a reporter
[min v]  of [variable1 v] :: variables reporter
This topic has more discussion. However, this is older and both have very good points.
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.
ScolderCreations
Scratcher
1000+ posts

Change Slider Min/Max with scripts

Bump

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/

Powered by DjangoBB