Page 266 - Scratch Programming Playground
P. 266
14. Create a Hitbox Costume for the Ground Sprite
the Platformer game code is based on the Cat sprite touching
the Ground sprite. the Ground sprite’s costume is a hitbox, so
if the Ground sprite’s costume is a full rectangle that takes up
the entire Stage, it will be treated as though the entire Stage
is solid ground. We need to remove the parts of the Ground
sprite’s costume that are part of the background and not plat-
forms.
the easiest way to do this is to click the Select tool in the
paint editor. drag a Select rectangle over the part of the cos-
tume you want to delete. after selecting an area, press delete
to remove that piece.
2
1 Drag the Select rectangle over the area
Click the Select tool. you want to remove and press DELETE.
Use the eraser tool to erase areas that aren’t rectangular.
If you make a mistake, click the Undo button at the top of the
paint editor to undo the deletion.
keep removing the background parts of the costume until
only the platform parts remain.
240 Chapter 9

