Bot Builders : Program Your Robot

Create your own block

  1. From the previous exercise, you were able to make your sprite move around.
  2. He seems more like he is flying, however.
  3. Let's make your robot smarter!

  1. First, let's make your robot animate.
  2. Normally, we'd add next costume to each If block, but that would be too tedious! Good thing, there's a better way to solve it!
  3. We can make our own custom block which will do the code blocks attached every time it's used.
  4. Create define step to make your own custom block.
  5. Now, you can code step ::/ custom and use it to make your robot walk.

  1. Add move (5) steps and next costume to define step.
  2. Replace move (5) steps inside each of the If blocks with step ::/ custom.
  3. Try making your robot move around and see what happens.
  4. Don't forget to click the green flag first!