How to check if a condition is not met in Scratch? Preview

Some conditions are easier to describe in Scratch than others. We can check with a single block if a sprite is touching a color or if it is touching the mouse.

For more complex conditions, such as whether it is NOT touching a color or whether it is NOT touching the mouse, we need more blocks.

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #1602
  • 30 Mar 2020

There is a block in the green block palette that allows us to describe such conditions:​​​​

content picture

In this block, you can place other conditions:

content picture

Conditions placed inside of this block are changed so that they return "True" if the condition is NOT met and "False" if the condition is met. If this block has a check "is the sprite touching something yellow", then the check would be changed to "is the sprite NOT touching something yellow".

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Keep 'em clean - remote Scratch game course
  • 41
  • 0:00
  • 70
Image for [Under ongoing development] Lesson 10 - Victory screen
  • 3
  • 6
  • 6
  • 3d_rotation 0