How to program our sprite to make a decision in Scratch? Preview

If we were to have a start block for every condition under which you might want your program to start, then they would be too many for us to learn all of them. Which is why we have a tool that executes code only if the condition we present is met.

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #1598
  • 31 Mar 2020

The block we are reffering to is in the orange block palette:

content picture

Like many other blocks in the orange palette, this block has a mouth. As the text suggests, if its condition is met, then it will execute the code in its mouth.

content picture

Unlike the starting block, this one checks its condition only when it is up for execution. The execution condition of its program is set using a block of the following shape:

content picture

There are several such blocks in Scratch and they are placed in the designated position shown in the next picture:

content picture

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 Lesson 8 - How to mess up the clean
  • 4
  • 3
  • 5
  • 3d_rotation 0