Discuss Scratch

MrDeniz
Scratcher
15 posts

Improved "when [v] > ()" block

This could have been possible in Scratch 2.0 because of hacked blocks i think. My idea is calling event when a variable exceeds a number. Here is the block itself

Original:
when [ v] > (10)
Improved:
when [] [> v] [] :: events hat
when (☁OnlineStatus) [= v] [1] :: events hat
when (y position) [< v] [-180] :: events hat


This can make this block more useful and I don't think new Scratchers might struggle at understanding it. Dropdown choices can be “=, <, >, not =”. This block also can be used to create infinite loops even when project stops just like
when [timer v] > (-1)

Last edited by MrDeniz (Jan. 1, 2020 20:50:12)

Nambaseking01
Scratcher
1000+ posts

Improved "when [v] > ()" block

It's one of those things that aren't really necessary. You might think the workaround is large and tiring, but Scratch is not only an introductory programming language. It should also train us for complex ones. These type of events are in no programming language (even in Python, which is by far the simplest).
46009361
Scratcher
1000+ posts

Improved "when [v] > ()" block

No support, because of this:

MrDeniz wrote:

This can make this block more useful and I don't think new Scratchers might struggle at understanding it. Dropdown choices can be “=, <, >, not =”. This block also can be used to create infinite loops even when project stops just like
when [timer v] > (-1)
And this:

Nambaseking01 wrote:

It's one of those things that aren't really necessary. You might think the workaround is large and tiring, but Scratch is not only an introductory programming language. It should also train us for complex ones. These type of events are in no programming language (even in Python, which is by far the simplest).
MrDeniz
Scratcher
15 posts

Improved "when [v] > ()" block

kChiaEC19 wrote:

No support, because of this:

MrDeniz wrote:

This can make this block more useful and I don't think new Scratchers might struggle at understanding it. Dropdown choices can be “=, <, >, not =”. This block also can be used to create infinite loops even when project stops just like
when [timer v] > (-1)
And this:

Nambaseking01 wrote:

It's one of those things that aren't really necessary. You might think the workaround is large and tiring, but Scratch is not only an introductory programming language. It should also train us for complex ones. These type of events are in no programming language (even in Python, which is by far the simplest).

I kind of agree, but this block's usage is limited with timer and loudness. If scratch adds this block, it would be more useful but it is a fact that users won't see this kind of functions in other programing languages. However, I still think it is not necessary to only accept loudness and timer as arguments.
Nambaseking01
Scratcher
1000+ posts

Improved "when [v] > ()" block

MrDeniz wrote:

I kind of agree, but this block's usage is limited with timer and loudness. If scratch adds this block, it would be more useful but it is a fact that users won't see this kind of functions in other programing languages. However, I still think it is not necessary to only accept loudness and timer as arguments.

Time and loudness blocks are things that Scratchers don't use much, so I think the event was just implemented to encourage that. Variables and the other ones you suggested are used a lot (and a lot of projects have a change detection system) so they wouldn't have to be added to this event.

Powered by DjangoBB