Discuss Scratch

Failord
Scratcher
1000+ posts

New hat/startup/event Block

So they recently added the new hat/startup/event block. The one that says, “when (video motion) > ( )”. Why is this necessary? Why not instead do, “when (boolean)”? That would make more sense. In fact, that could replace “when (key) pressed” by stacking, for example, “when (key space pressed)” on top of “wait until (not(key space pressed))”. The wait part is just to prevent “re-stimulus.” It wouldn't be absolutely required.

Link to 1.4 forums with in-post scripts in case you're confused- http://scratch.mit.edu.ezproxyberklee.flo.org/forums/viewtopic.php?id=114715

Another thing, less confusing because it uses the same bases as the c-loops. New Scratchers get more used to using the same stuff, as opposed to a bunch of different variations.

Last edited by Failord (Feb. 20, 2013 02:52:08)

nXIII
Scratcher
1000+ posts

New hat/startup/event Block

It's because the values available in that hat block are all input sources—it's common to want to start a thread upon a certain input. It has workarounds, like many other blocks, but since it's done quite often and it makes audio/video input really easy to use & grasp, I think it's fine. We're not exactly pressed for space in the Events category, anyway.

Instead of the generic when { } hat, use
forever
if {condition}
The when hat would have to poll its value, so it's the same as that script.*

*Except for the different reentry semantics for hat blocks, but I can't think of a single scenario where that would be useful with a when { } hat.

Last edited by nXIII (Feb. 20, 2013 01:14:41)

Failord
Scratcher
1000+ posts

New hat/startup/event Block

I dunno. I think this script is about as necessary as “forever if.”
nXIII
Scratcher
1000+ posts

New hat/startup/event Block

Failord wrote:

I dunno. I think this script is about as necessary as “forever if.”
Forever if { } was removed because it was confusing, not because it had a short workaround.
Failord
Scratcher
1000+ posts

New hat/startup/event Block

The point is, the new script only does three different things, and isn't very adjustable. There's no “when (video motion) = ( )” and so on. It only has three different dropdown imputs that are already reporter blocks, and a boolean could be adapted to start a script when a list contains an item. Besides, this script might just confuse new Scratchers in the first place.

Dang typo. Hit c instead of v.

Last edited by Failord (Feb. 20, 2013 02:51:08)

nXIII
Scratcher
1000+ posts

New hat/startup/event Block

Failord wrote:

Besides, this script might just confuse new Svratchers in the first place.
How is it confusing? It's more straightforward than
 forever
if { { loudness } > ( 10 ) }

wait until { not { { loudness } > ( 10 ) } }

Last edited by nXIII (Feb. 20, 2013 04:06:22)

Hardmath123
Scratcher
1000+ posts

New hat/startup/event Block

nXIII wrote:

Failord wrote:

Besides, this script might just confuse new Scratchers in the first place.
How is it confusing? It's more straightforward than
 forever
if { { loudness } > ( 10 ) }
Don't forget to add “wait until loudness < 10” at the end!
Failord
Scratcher
1000+ posts

New hat/startup/event Block

Yes! No! Wait… I need to change something…

I'm starting to think this topic is breeding anger. I might request to close it since we're all making each other angry. I don't want to be hating on anyone. I'm just trying to get a point across.

Last edited by Failord (Feb. 20, 2013 02:49:36)

Failord
Scratcher
1000+ posts

New hat/startup/event Block

nXIII wrote:

Failord wrote:

Besides, this script might just confuse new Svratchers in the first place.
How is it confusing? It's more straightforward than
 forever
if { { loudness } > ( 10 ) }
Okay, let's make a c-loop for “if (video motion) > ( )” too! For the new Scratchers! Because they like the Event block.

Last edited by Failord (Feb. 20, 2013 02:48:36)

nXIII
Scratcher
1000+ posts

New hat/startup/event Block

Hardmath123 wrote:

Don't forget to add “wait until loudness < 10” at the end!
Ah, yes. I forgot it fired like that.

(Technically it should be “not { { loudness } > (10) }”)

EDIT: I messed up implementing the workaround. New Scratchers will, too.

Failord wrote:

Okay, let's make a c-loop for “if (video motion) > ( )” too! For the new Scratchers! Because they like the Event block.
How would that be different than the even hat?

EDIT: Also, that's not a loop.

Last edited by nXIII (Feb. 20, 2013 04:07:11)

Failord
Scratcher
1000+ posts

New hat/startup/event Block

I dunno. I think I screwed up trying to get my point across. What I was trying to say is there really isn't a NEED for this script, that only new Scratchers will use it or it will only be used in sample projects. The boolean thing was just another idea, but when I think about it, events use different stuff than c-loops, which is why c-loops use Boolean.

Last edited by Failord (Feb. 20, 2013 12:36:06)

ExtremeLogic
Scratcher
500+ posts

New hat/startup/event Block

See here.
OR
See below:

RSQgame wrote:

when <>//category=events
I KNOW THERE IS
wait until <>
But what RSQgame wrote is just interesting.
spgame05
Scratcher
100+ posts

New hat/startup/event Block

Support!
mathfreak231
Scratcher
1000+ posts

New hat/startup/event Block

It's actually now that hard to work around.

And then there's the ambiguity: Would it work only the first time it becomes true, or run any time it is true, or run once, wait until it becomes false, and wait until it becomes true again?

Although you, as the suggester, probably know the answer, not everyone who comes across the block will.
Tramcrazy
Scratcher
100+ posts

New hat/startup/event Block

when green flag clicked
wait until <...>
...
ExtremeLogic
Scratcher
500+ posts

New hat/startup/event Block

spgame05 wrote:

Support!
Thank you.

mathfreak231 wrote:

It's actually now that hard to work around.

And then there's the ambiguity: Would it work only the first time it becomes true, or run any time it is true, or run once, wait until it becomes false, and wait until it becomes true again?

Although you, as the suggester, probably know the answer, not everyone who comes across the block will.
Work the first time it's true, I guess.

Tramcrazy wrote:

when green flag clicked
wait until <...>
...
(removed by moderator - please keep it polite)

ExtremeLogic wrote:

See here.
OR
See below:

RSQgame wrote:

when <>//category=events
I KNOW THERE IS
wait until <>
But what RSQgame wrote is just interesting.

Last edited by spectre_specs (Dec. 11, 2022 19:49:34)

DevanWolf
Scratcher
100+ posts

New hat/startup/event Block

There was a
when<>is true::events hat
block in the beta version of Scratch from November 2006, but in 1.0 it was replaced by
when flag clicked
forever if<>
which was replaced by
when flag clicked
forever
if<>then
in Scratch 2.0. So just use that ↑.
djdolphin
Scratcher
1000+ posts

New hat/startup/event Block

DevanWolf wrote:

There was a
when<>is true::events hat
block in the beta version of Scratch from November 2006, but in 1.0 it was replaced by
when flag clicked
forever if<>
which was replaced by
when flag clicked
forever
if<>then
in Scratch 2.0. So just use that ↑.
Stolen post much?

Last edited by djdolphin (Sept. 2, 2014 23:44:42)

turkey3
Scratcher
1000+ posts

New hat/startup/event Block

djdolphin wrote:

DevanWolf wrote:

There was a
when<>is true::events hat
block in the beta version of Scratch from November 2006, but in 1.0 it was replaced by
when flag clicked
forever if<>
which was replaced by
when flag clicked
forever
if<>then
in Scratch 2.0. So just use that ↑.
Stolen post much?
Wow you got quite the memory/dignity to hunt that down.
hppavilion
Scratcher
100+ posts

New hat/startup/event Block

ExtremeLogic wrote:

See here.
OR
See below:

RSQgame wrote:

when <>//category=events
I KNOW THERE IS
wait until <>
But what RSQgame wrote is just interesting.
*Sigh*
The thing is, the only way to make that work is the higher-language equivalent of
 forever
if <> then
start script ::more_blocks
end
end
//or just
wait until <>
So really, this is just going to make “real” programming harder for people who use it by making it easier now and thus would be detrimental. -1.

Last edited by hppavilion (Sept. 3, 2014 22:43:01)

Powered by DjangoBB