From the course: Learning Scratch

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Sensing

Sensing - Scratch Tutorial

From the course: Learning Scratch

Start my 1-month free trial

Sensing

- [Voiceover] Sensing scripts are there to detect information. If you look at them, you'll notice that they're different shaped from most of the other scripts that we've looked at. If you look at the motion script, most of these scripts are semi-rectangular with rounded edges and with notches on the top and the bottom. But the sensing scripts have pointed edges and they're hexagons for the most part. But there's also these circular ones. The scripts that are hexagons are for putting inside of the control if-then-else statements. So you can see those hexagon shapes are right there. So these are values that are true or false. And then we also have these rounded ones. And the rounded ones are values. These will give us, for example, maybe a number value. Notice that at the end of the hexagonal shapes, you're going to see a question mark. So it's evaluated as true or false. And it's then plugged into an if statement. So let's just see an example of that now. So here we have a very simple…

Contents