Goal:
Now it’s time to code for what happens when Iron man touches the ground.
When the player lets Iron man touch the color of the ground, the game needs to reset.
Steps:
- Still on the Iron Man sprite, From Events, place a When green flag clicked block to an empty space.
- From Control, add a forever loop, then put an IF statement inside it.
- From Sensing, add a touching color block inside the condition of the IF statement.
- Click the color bubble and select the button with a picture of a dropper. Use the dropper tool to select the exact color by clicking on the actual ground in your game window.
- Lastly, From Events, place a broadcast reset_game block inside of the IF statement.