Page 252 - Scratch Programming Playground
P. 252
false value is stored in the moving up input just like a vari-
able would store it. If we put y velocity > 0 in the if then
block instead of moving up, then the cat would end up rising
above the ceiling instead of bumping against it.
right-click the define handle ground block and select
edit from the menu.
Click the gray triangle next to Options to expand the
window, and click the button next to Add boolean input.
Name this new input field moving up and then click OK.
this will add a new moving up block that you can drag off
the define handle ground block just like you do with blocks
from the Blocks area. this moving up block will be used in
a new if then else block. Modify the define handle ground
block’s code to match this.
226 Chapter 9

