Wednesday, February 27, 2008

Race Tutorial





HOW TO MAKE A RACE IN SCRATCH (HINTS)

1) Choose suitable racing sprites – in this case they must have 2 costumes
Costumes tab > import

2) Reduce sprite size, to, say 40%

3) Get it moving and changing its costume

forever
move
wait
next costume
move
wait
next costume

4) Do the same for the other sprite
It’s easiest to duplicate original sprite and then redo the costumes of the duplicate

5) Bounce off the edge
motion > if on edge, bounce
Alter rotation style for back and forward motion

6) Randomise motion
Numbers > pick random 1 to 10

7) Draw a finish line
New sprite
Pen down
Point in direction up
Set pen size to 20
move

8) Finish the race when one sprite crosses the finish line

forever
if touching colour
Say “I win!” for 2 seconds
Stop all
else
movement script

No comments: