Scratch exercise 03

Control a characters movements with key presses (make the cat walk)

Complete these steps ..


1. Create a new game. Either open Scratch or if it is already open choose "File>New" ..



2. Re-name sprite1 "Cat".



3. Because we are looking at the Cat straight on (not from above) we should click the middle direction/rotate button to stop the Cat from turning upside down ..



4. Now let's add the scripts so we can make the Cat walk. Look at the image below and copy the 4 scripts to make the Cat walk ..


Press the arrow keys on your keyboard to test your scripts.



5. The scripts are a bit slow and glitchy. Let's make some better ones.

Delete the four key pressed scripts by dragging them left off the scripting area ..



6. Replace the scripts you have deleted with this better one ..



7. We need a script to end the game. Add this script.

Press the "B" key to start the game and then try out the arrow keys. Next, press the "E" key to end your game.



8. Go to "File > Save as" and save your game. Name it "Arrow keys control"



9. What happens if you reverse the "10" and "-10" values in the "change y by" scripts?

What happens if you increase the "change x by" values from 10 to 20?