Discuss Scratch

codinggames9000
Scratcher
13 posts

Just A Random Block Suggestion

Hi. I'm @codinggames9000, and I have a block suggestion. I was thinking we could do something like…

The “Between” Block (for Operations)

<between (1) and (10)>

This block is kind of like the “pick random” block, but it would, instead of picking a random number, allow any number between the two values.

EXAMPLE:

if <<(applesCollected) = <between (25) and (50)>> and <(timer) = [60]>> then
broadcast [win v] and wait
else
broadcast [time's up v] and wait
end

That's all for now! Thanks for reading this!

Last edited by codinggames9000 (Nov. 4, 2020 22:21:45)

mtech22
Scratcher
1000+ posts

Just A Random Block Suggestion

Please don't make lists of suggestions and instead make a new topic for each one as it is easier for moderators and scratchers.
codinggames9000
Scratcher
13 posts

Just A Random Block Suggestion

mtech22 wrote:

Please don't make lists of suggestions and instead make a new topic for each one as it is easier for moderators and scratchers.
fixed it
Vibrato
Scratcher
1000+ posts

Just A Random Block Suggestion

that's not a "pick between" block. That's just between.

No support, just use a couple of these
<[] < []>
<[] > []>
<[] = []>
Vercte
Scratcher
500+ posts

Just A Random Block Suggestion

Maybe rephrase it as
<() is between () and ()? :: operators boolean>
(code for it is
<() is between () and ()? :: operators boolean>
)

Support! This seems like a better way to cut down on those annoying long booleans that are long to edit.
lovecodeabc
Scratcher
1000+ posts

Just A Random Block Suggestion

codinggames9000 wrote:

Hi. I'm @codinggames9000, and I have a block suggestion. I was thinking we could do something like…

The “Between” Block (for Operations)

<between (1) and (10)>

This block is kind of like the “pick random” block, but it would, instead of picking a random number, allow any number between the two values.

EXAMPLE:

if <<(applesCollected) = <between (25) and (50)>> and <(timer) = [60]>> then
broadcast [win v] and wait
else
broadcast [time's up v] and wait
end

That's all for now! Thanks for reading this!
What happens when
<between [Hello] and [Gasp!]>
mlcreater
Scratcher
1000+ posts

Just A Random Block Suggestion

lovecodeabc wrote:

codinggames9000 wrote:

Hi. I'm @codinggames9000, and I have a block suggestion. I was thinking we could do something like…

The “Between” Block (for Operations)

<between (1) and (10)>

This block is kind of like the “pick random” block, but it would, instead of picking a random number, allow any number between the two values.

EXAMPLE:

if <<(applesCollected) = <between (25) and (50)>> and <(timer) = [60]>> then
broadcast [win v] and wait
else
broadcast [time's up v] and wait
end

That's all for now! Thanks for reading this!
What happens when
<between [Hello] and [Gasp!]>
The block would have numbers-only inputs.
If someone forced a string into it like that, the block would consider the string(s) to be 0, as happens when you try to add
[a] + [b] // 0
lovecodeabc
Scratcher
1000+ posts

Just A Random Block Suggestion

mlcreater wrote:

lovecodeabc wrote:

codinggames9000 wrote:

Hi. I'm @codinggames9000, and I have a block suggestion. I was thinking we could do something like…

The “Between” Block (for Operations)

<between (1) and (10)>

This block is kind of like the “pick random” block, but it would, instead of picking a random number, allow any number between the two values.

EXAMPLE:

if <<(applesCollected) = <between (25) and (50)>> and <(timer) = [60]>> then
broadcast [win v] and wait
else
broadcast [time's up v] and wait
end

That's all for now! Thanks for reading this!
What happens when
<between [Hello] and [Gasp!]>
The block would have numbers-only inputs.
If someone forced a string into it like that, the block would consider the string(s) to be 0, as happens when you try to add
[a] + [b] // 0
Oh
misteray
Scratcher
1000+ posts

Just A Random Block Suggestion

Like Vibrato said, you can just use “more than” “less than” and “equal to” blocks, to make something like this


if <<[Variable] < [20]> and <[Variable] > [10]>> then
Code

Semi support, could be useful for using less code blocks, but has an easy work around

Last edited by misteray (Nov. 6, 2020 02:52:48)

gosoccerboy5
Scratcher
1000+ posts

Just A Random Block Suggestion

This would make things a bit less clunky but otherwise I don't see too much of a need sorry
panda-wat
Scratcher
100+ posts

Just A Random Block Suggestion


What would happen if it was installed like this?

if <between (1) and (10)::operators> then
end

I suggest changing the block to
<(1) is between (1) and (10)::operators> // would report "true"
<(11) is between (1) and (10)::operators> // would report "flase"

all three inputs would accept only numbers. that being the 10 digits, -, and the decimal point.

Last edited by panda-wat (Nov. 6, 2020 04:16:15)

Powered by DjangoBB