Discuss Scratch
- Discussion Forums
- » Suggestions
- » Min/Max Number Input (19 Supporters, want to add to it?)
- Blank1234
-
Scratcher
500+ posts
Min/Max Number Input (19 Supporters, want to add to it?)
“no support”, is just forum talk for i dont support this ideai dont get the point… No? That's not what I'm asking for at all… I really don't think you understand what I'm asking here. xP Try rereading what I'm looking for.
no support
+scratch doesn't have the current architecture to support this
and, couldn't someone just do thissomething (join [][111231231231]) :: custom
- Aboot4
-
Scratcher
100+ posts
Min/Max Number Input (19 Supporters, want to add to it?)
Yeah I know. You're still misunderstanding everything I'm saying… Again, try rereading what I wrote out.“no support”, is just forum talk for i dont support this ideai dont get the point… No? That's not what I'm asking for at all… I really don't think you understand what I'm asking here. xP Try rereading what I'm looking for.
no support
+scratch doesn't have the current architecture to support this
and, couldn't someone just do thissomething (join [][111231231231]) :: custom
- TheMonsterOfTheDeep
-
Scratcher
1000+ posts
Min/Max Number Input (19 Supporters, want to add to it?)
I like the idea, but Blank1234 does bring up a good point:
What if I do the following:
It will work for values 1, 2, 3, 4, and 5, but then once example gets to 6, the block might potentially break if it allowed the 6 through.
I guess it is easier to see in this situation:
However, you could have it so that a value that was bigger than the max would simply be reduced to the max, and something smaller than the min would be increased to the min.
I guess I semi-support, because this problem is doable but I don't really see where the block could be used.
Also, it probably isn't necessary to have your post in 5 quote boxes.
What if I do the following:
set [example v] to [1]
repeat (10)
something (example) min 0 max 5 :: custom
change [example v] by (1)
end
It will work for values 1, 2, 3, 4, and 5, but then once example gets to 6, the block might potentially break if it allowed the 6 through.
I guess it is easier to see in this situation:
set [example v] to [6]Unless you banned variables from inputs with mins and maxs, it wouldn't work.
something (example) min 0 max 5 :: custom
However, you could have it so that a value that was bigger than the max would simply be reduced to the max, and something smaller than the min would be increased to the min.
I guess I semi-support, because this problem is doable but I don't really see where the block could be used.

Also, it probably isn't necessary to have your post in 5 quote boxes.

- Aboot4
-
Scratcher
100+ posts
Min/Max Number Input (19 Supporters, want to add to it?)
I like the idea, but Blank1234 does bring up a good point:
What if I do the following:set [example v] to [1]
repeat (10)
something (example) min 0 max 5 :: custom
change [example v] by (1)
end
It will work for values 1, 2, 3, 4, and 5, but then once example gets to 6, the block might potentially break if it allowed the 6 through.
I guess it is easier to see in this situation:set [example v] to [6]Unless you banned variables from inputs with mins and maxs, it wouldn't work.
something (example) min 0 max 5 :: custom
However, you could have it so that a value that was bigger than the max would simply be reduced to the max, and something smaller than the min would be increased to the min.
I guess I semi-support, because this problem is doable but I don't really see where the block could be used.
Also, it probably isn't necessary to have your post in 5 quote boxes.
Agreed.
- Blank1234
-
Scratcher
500+ posts
Min/Max Number Input (19 Supporters, want to add to it?)
workaruond. dont type in the numbers higher then the max, same with the numbers lower then the minYeah I know. You're still misunderstanding everything I'm saying… Again, try rereading what I wrote out.“no support”, is just forum talk for i dont support this ideai dont get the point… No? That's not what I'm asking for at all… I really don't think you understand what I'm asking here. xP Try rereading what I'm looking for.
no support
+scratch doesn't have the current architecture to support this
and, couldn't someone just do thissomething (join [][111231231231]) :: custom
- Aboot4
-
Scratcher
100+ posts
Min/Max Number Input (19 Supporters, want to add to it?)
That's not a workaround… The point of the block is to make it so it's impossible to go higher or lower than the min-max when using the input. Look:workaruond. dont type in the numbers higher then the max, same with the numbers lower then the minYeah I know. You're still misunderstanding everything I'm saying… Again, try rereading what I wrote out.“no support”, is just forum talk for i dont support this ideai dont get the point… No? That's not what I'm asking for at all… I really don't think you understand what I'm asking here. xP Try rereading what I'm looking for.
no support
+scratch doesn't have the current architecture to support this
and, couldn't someone just do thissomething (join [][111231231231]) :: custom
define Eat (Cookies) Cookies//Minimum is 1, Max is 10, so nothing above or belowUnderstand? There's nothing stopping a player from typing in “11” or “0” for the answer. But, as Princeskat said:
ask [Choose a number 1 through 10.] and wait
set [Cookies Eaten v] to (Cookies)//This will ONLY work if the answer is > 1 and < 10
Hmmm… this sounds great, but a Scratcher may get confused when trying to type in a number and finding it doesn't work, though I'm not sure how much that'd happen. Maybe there should be something somewhere saying what the min and max is? There is also a workaround, I'm pretty sure:So there IS a workaround, just not yours. xPdefine number (n) min 0 max 5
if <(n) < [0]> then
number (0) min 0 max 5
stop [this script v]
end
if <(n) > [5]> then
number (5) min 0 max 5
stop [this script v]
end
Last edited by Aboot4 (July 13, 2015 10:53:45)
- cheezboy18
-
Scratcher
78 posts
Min/Max Number Input (19 Supporters, want to add to it?)
Support! All though there is a work around
) and it would auto-correct.
I repeat, support.
define do this for (seconds) seconds //This would be an input with min:3 max:10This would prevent smaller inputs/larger inputs, but then again they would not know what they're putting in (unless they read the code
if <[3] > (seconds) > then
... for [3] seconds::grey
end
if <[10] < (seconds) > then
... for [10] seconds::grey
end
) and it would auto-correct.I repeat, support.
- the2000
-
Scratcher
1000+ posts
Min/Max Number Input (19 Supporters, want to add to it?)
I would much prefer a way to dynamically alter the custom block variables along with min and max and/or clamp blocks. That way you could build the limits yourself, which seems like a much more logical way to go about doing this.
- Discussion Forums
- » Suggestions
-
» Min/Max Number Input (19 Supporters, want to add to it?)






