I just joined, and am confused

what does it mean about creating ur own blocks?? this seems cool, but i dont understand.

One of Snap's best features and something that separates it from Scratch is that you can make blocks that essentially act as functions and can be executed from multiple places in a script without having to constantly duplicate the code!

Small custom block I made, just for demonstration!

This is a very basic explanation, and for a much further in-depth explanation of how to make them and what you can do with them, I suggest you refer to pages 40-45 of Snap's Reference Manual.

Welcome!

Scratch did add custom block functionality a while ago, but Snap! has much more freedom when making blocks.

Among other things, Scratch allows only custom command blocks, whereas Snap! also allows custom reporters.

Welcome to Snap!!

welcome!

snap's custom blocks are more advanced than scratch, also if youre wondering why you cant create hat blocks

click this

(i still want making hat blocks to be real, the when block is laggy if your script is big)

I think you may be disappointed if we implement that. The reason the primitive hat blocks are faster than the generic one is that the primitive ones are fired by specific events (a keypress or mouse click, for example), and instead of the hat block repeatedly checking for that event, the code inside Snap! that processes keypresses or clicks, as part of its task, looks for scripts whose hat blocks want that particular event. While you aren't pressing a key or clicking the mouse, which is pretty much all the time when you compare computer speed to human being speed, the hat block isn't doing anything at all. But if you can make your own hat block, how do you envision saying what condition should trigger it? The only way I can think of is by writing a Boolean expression, which the hat block will have to keep checking, just like the existing generic WHEN.

i think for custom hat blocks, we have to add a forever and if block inside it and make sure if they are removed, it gives a error (im talking about making custom hat blocks if youre confused)

Yes, well, we already have a thread about that, so let's stop hijacking this one! (Sorry, @walruses!)

ok

welcome to snap