How to Make a Scratch Robot Interactive

By Derek Breen

Half the fun of drawing and painting stuff in Scratch is using code to make them interactive. Go to the Scripts tab on your robot and add the following code:


You don’t have to click the Green Flag button on the Stage to test this code; just click the arrow keys on your keyboard. You may need to adjust the values on the blocks beneath WHEN UP ARROW and WHEN DOWN ARROW to make those motions appear more natural against your backdrop (as if the robot is moving into the distance or closer to the viewer).

Another thing that distinguishes robots from one another are the bleeps and blurps some make in place of human words. Here’s one approach for your robotic sounds:


You can hold down the spacebar for a stream of random beeps or clickity-click the spacebar for your own intermittent beeps (like melodic Morse code). Try changing the values in the RANDOM block to get a different mood. Additionally, you can change the BEATS value to extend or cut off the beeps.