concept touching block in category scratch

appears as: Touching blocks, Touching block
Hello Scratch!: Learn to program by making arcade games

This is an excerpt from Manning's book Hello Scratch!: Learn to program by making arcade games.

The variable in figure 3.19 has a numerical value. The variable starts the game with a value of 3, which means that the player has 3 tries. A variable can also have a word value, called a string in programming. A string is any word you could assign an object, such as having a variable called Jewel and having the value either be diamond, ruby, sapphire, or emerald. Diamond, ruby, sapphire, and emerald are all strings. A variable can also have a true/false value, called a Boolean in programming. You’ll read more about these in the next section when you learn about Touching blocks.

  • Click the Sensing block menu and drag a Touching block to the If/Then block. Drop it inside the empty, hexagonal space in the If/Then block. Open the drop-down menu in the new block by clicking inside its box, as seen in figure 3.21, and click Edge so that the block now says Touching Edge.
  • Figure 3.21. The drop-down menu that comes with the Touching block from the Sensing menu