A broadcast is a signal that is sent through the Scratch program, which will activate any scripts that are listening for that signal. For example, I might have a sprite that needs to appear and show itself when the start button is pressed, I could use a Broadcast block called “show yourself” and have the matching Broadcast listener event attached to the correct sprite. When the sprite hears the signal “show yourself” it will execute all the code attached to that block.
This is just a very simple example of the Broadcast block as there are wayyyy more ways to use it. There is not a limit to how many broadcasts you can have, however, too many may slow your program down.
Cloning is a feature that allows a sprite to create a clone, or copy, of itself, while the project is running. Clones of a sprite will be the same as the original sprite, but as a separate instance. Clones inherit the parent's code, costumes, sounds, and other properties, however clones can be modified separately.
This can be really useful when you need more than one instance of a sprite at and the Cloning block allows you to do this without having to create another sprite yourself. This can also help with reducing the size of our projects as we don’t need to manually make copies and store them in our projects. Getting comfortable with using the cloning blocks will help you to develop more advanced projects.
In most common programming languages, custom blocks are called "procedures," or "functions," or "methods." This block is useful for reusing a sequence of blocks in different parts of code, without duplicating the blocks for each usage. You can think of custom blocks as code blueprints which you can use over and over when you need them simply by calling it. Functions have the advantage of being able to be passed data which makes them very flexible.
For example, I want to create some code that makes a sprite rotate clockwise or anticlockwise a specific amount of times, by a set number of degrees. I can use a custom block called “spin me around” that passes three arguments to the custom block.
We use arguments to make our functions more flexible.
The number of times to run the loop
The direction of rotation
The rotation amount in degrees