"When touching color ()" Block
-
Prerequisite
Description
The “When touching color ()” block is a Hat block in the Events category.
How does this block work?
This block runs the blocks attached below it when the current sprite touches the specified color.
To choose a color, you can click on the color input and then change the “color” bar left or right.
You can also use the “color picker” tool to select any color on the stage.The example below shows that when the current sprite (Goblin) touches the blue crystal, it changes the costume and says “I found treasure”.
Animation
Here is how you can create a simple game with the “When touching color ()” block. For example, when the Goblin touches the blue color on the crystal, it gets a point.