A lot of custom blocks

If you look inside this program (by clicking edit), it has a bunch of cool custom blocks that I made. Most of these came from either PenguinMod, the Snap! library, or blocks in scratch. And some of them I designed myself!
extra blocks

Wow! lots of blocks!
ok so I spent like 1 hour recreating the scratch contains block and then I looked here and now I am so mad there was a 5 block solution :skull:

The INVERSE block actually exists as a primitive: as a dropdown in the list attribute block:[scratchblocks]
([reverse v] of ⌸ :: list)
it also works with an empty list: rather than returning a 2 item list like the custom version does, it just returns another empty list.
(bh was right, dropdowns do hurt discoverability.)

oh, thanks for the heads up.
It looks like its the same for shuffled, so ill remove both of those blocks

happy to help :​D

It's also in the strings, multiline input library.

I do want to mention that the (hidden) scratch <loud?> block is based off the microphone volume, not the sprite volume.

Oh right.

Here's the wiki page about it, if you want it to behave the same way as it does (or did) in scratch.

Gaah! I thought we had too many blocks already.

Seriously, beyond a certain point people can't find anything. It'll be a little better in v10 because you'll be able to organize custom blocks into groups within a category.

A few things I noticed:

extra blocks script pic
The primitive MOVE TO [STAGE v] lets you drop a two-item list onto the menu and takes it as the (x,y) position to move to.

extra blocks script pic (1)
If you're going to make user-visible variables behind the scenes, don't pick names likely to conflict with ones the user used. So, something like #$%HOME%$# would be a good name. :~) Also, the scope should be sprite-local, not global!

extra blocks script pic (2)
Two things. First, what IF ON EDGE BOUNCE does isn't turn 180. It does Snell's-Law specular reflection. Second, you consistently use Boolean(unevaluated) type instead of just Boolean. That's hardly ever what you want, unless you're writing a looping block such as FOREVER IF.

extra blocks script pic (3)
I think a threshold in percent would be more often useful than an absolute threshold.

extra blocks script pic (4)
I'm not sure what your proposed use is for this block. The primitive extra blocks script pic (5) is happy to take Booleans in the second and third slot. And if you're going to do something like

you can just say extra blocks script pic (7) instead!

Are you saying this block should except a list?

What is it a percentage of?

Yeah, if the idea is for it to be analogous to MOVE TO. Don't you think?

Good question. Whichever's smaller, I guess.

Yeah I know it was in the library, I have used it in some of my projects. but I thought there had to be a better way than using EXTENSION blocks.

Few more things:

(simplified definition)

extra blocks script pic(2)
block needs the boolean slot to be of type BOOLEAN (UNEVALUATED) because it is broken

These blocks (first one being a primitive) are not the same! The primitive also uses a BROWSER alert function rather than in Snap!. (also you seem to have been in dev mode at some point while making this project as I can see by the
extra blocks script pic block so you may already know about this)

Even worse, in snap 10, this exists:

a sort-of hybrid browser-snap! alert block...

also, many blocks that exist in libraries

and a lot of blocks that are just primitives but inside an ask block.

and not everything has to be like in scratch. I mean, if it did, then why have snap! at all in the first place? (talking about the rotation style and draggable blocks)

(also, um, sorta unrelated, but I saw the
extra blocks script pic(1)
block in this project, and, while I never used it, I realized: this is not in the palette! when did this become dev-mode exclusive and why?)

But yeah, as @bh said, when people made gazillion block collections, I can just take the ones I like for my own :​) (really great project).

They deprecated it because it was kind of ambiguous and confusing.

It was removed because if you're checking in a loop for if a message is sent, then it could miss that if another broadcast was sent immediately after. Plus, the when I receive [] block gained an arrow, which when expanded, shows a data variable, which contains the message that was sent (and data that might've been sent with the message).

For me, in the while block, setting it to unevaluated made it run forever even if the boolean was false.

can i see the code?

If you don't set it to unevaluated, then the state will never change, resulting in an infinite loop when it should've stopped.


i built it exactly like the one in the library. In fact, even the one in the library doesnt work. It doesnt run at all. (when i didnt have the call it ran forever) What is happening?

You did not build it exactly like the version in the Iteration composition library.

Your block
untitled script pic (69)

With (pred) set as just boolean.

The library block

With (pred) set as boolean (unevaluated).

Here is a simple test to see whether it will actually work.

untitled script pic (67)

untitled script pic (68)

(for some reason the result doesn't show unless I use script pic)

As you can see, your while block keeps running while the variable is above 10. This is because when you use a regular boolean slot, it gets evaluated righ then and there, and the value cannot change. If it's unevaluated, you have to call the condition, which can change.

Wait.....I could've sworn I updated it......anyways it works now. Thanks