First-class hat blocks

I'm pretty sure it's been like that since the generic when block was added. The stop sign turning into a square is to let you stop when blocks, but you can press it again (or press the green flag) to start them again. The reason they don't require you to press the green flag, is because they are events that can run whenever. This is also similar to how the regular hat blocks run, they don't have to run after you click the green flag.

I think this is just a feature that hasn't changed that you're getting a little confused about. Plus, if you accidentally click the stop sign twice, that's not a bug, that's a user mistake.

this:
image
when [timer V] > ((timer)-<key(space V)pressed?>)
lets you use when <> with the key (space V) pressed? block being the condition.

Whoah, that's actually genius. I never thought of using that for custom when blocks in scratch.

yeah, I figured it out when I was looking into how to make the when $stopSign clicked :: events hat block.

That is remarkable, indeed! But only because of the funny way how Scratch lets you typecast Booleans into integers, which, alas, I also didn't disable in Snap! back when there still would have been time :slight_smile:

why would you have?

because

sorry if I sound pushy, but any updates on the
start when green flag, stop sign, or even pause is clicked! script pic
blocks? and which one of these are you trying to detect? I really havent been able to figure this out yet!

Unfortunately no. I do have work to do, so I haven't gotten any further. To answer your other question, I am doing option B - when play button clicked.

ok nice

Oh, I didn't mean that I thought that only the green flag would do; I know if you type a key that triggers a WHEN (key) PRESSED block that's good enough, for example. But I didn't think that trying to stop scripts when they're already stopped would be good enough. I think it's too likely for a user to double-click stop accidentally (but maybe only those of us who've been around long enough to remember when you had to double-click a script to run it?) while trying to stop scripts.

If a user mistake is likely enough, especially if it's probably a misclick rather than a conceptual misunderstanding, we try to avoid it. That's why, for example, it's no longer the case that dragging a reporter into an input slot does or doesn't ringify it depending on how close to the slot you are when you let go, as it did in BYOB3 (one of my worst design decisions). And that's why Jens is excited about WHEN ... TRIGGERS to avoid the common mistakes users make about testing conditions, although that one is a conceptual misunderstanding.

So, I believe you that it's always been this way, but since the whole point of the square stop sign feature is to prevent runaway hat blocks, I don't see any benefit to going back to normal octagonal mode when you click the stop sign again -- why would a user ever do that on purpose?

I really did not like that. Good its changed!

when slot [ V] signals [ V] :: control hat ?

to turn on hat blocks. I think it should be a separate button though.

Now that we're supporting APL-style programming, it's a good thing that you can use Booleans as integers! :~)

Jens is considering generallizing that to a feature that allows generic triggers.

I agree that a different button would be better. Or, no button, since clicking on any script is enough.

for cust. blocks?

well, i think its weird to do that when I want to disable hat blocks for a little bit.

I guess so, although maybe it'll feel less weird if you click on a custom hat block. :~)

Yes, maybe. Nothing is settled. But I was talking about an (also not settled!) variant on the generic WHEN hat block, called WHEN < > HAPPENS or WHEN < > TRIGGERED.

But what if you want to click on a script to run it without running all the other hat blocks? That's another reason why stopping all hat blocks, and making the user click the stop sign again is useful. I know for a fact that people would really like to be able to test code without having to worry about already running scripts.

I'm confused. Clicking on a script to run it does re-enable generic/custom hat blocks, no?

great idea

thats in the events library, if thats what youre talking about.

It doesn't (I just tested before sending the last post), and I think it's great behavior.

play
Also, during my experimenting with a much more complicated definition, I somehow got it to trigger when the pause button is pressed twice, which shouldn't be possible because the project is paused. I haven't been able to replicate the behaviour.