1.4.2 Hat Blocks

View

Hat blocks have rounded tops. These blocks are placed at the tops of stacks. As Hat blocks are designed to start a script, they are shaped so no blocks can go on top of them.  They wait for an event to happen, such as a certain key being pressed, to start a script and run the blocks underneath them. Notice that the text on Hat blocks always start with “when”. They will start running the code or instructions underneath when a certain event happens.

 

Figure 19: Examples of Hats blocks

Last modified: Thursday, 23 September 2021, 10:23 AM