- Slides: 14
Lesson 05 – Heroes and Villains • Using sensing blocks to control actions • Make a simple game that has an ending
Step 1 • On the webpage, click on “Scratch 2. 0 Website” • This will then go to the online scratch program.
Step 1 • Or go onto Google and type “Scratch” • Then click on the create button
Step 2 Deleting sprites and adding in new ones • Right click on the cat and go to delete. • Each image in Scratch is called a Sprite.
Step 2 Choose paint new sprite Draw your own sprite, it can be anything to do with heroes and villains. You can draw a new sprite on the screen
Step 2 You can draw a new sprite on the screen Go to Google, type in cartoon hero or cartoon villain. Draw a villain and a hero, you will use both in your game. Or use a sprite from the scratch library
Step 3 Changing the names of the sprites Click on your sprite and the blue i. Label one Good guy and one bad guy
Step 4 Making the sprites move around the screen Add this block into one of your sprites. What do you think it does? Which menu do you think these blocks are in? Check the colours!
Step 4 What is the problem with just having this in the program at the moment? Making the sprites move around the screen The character cannot move around the screen with an input from the user. Choose this block and select the up arrow
Step 4 Drawing on the stage with the pen tool Select the point in direction block, notice the direction of up. Add in the other key directions.
Challenge Time One 1. Add movement to the good guy and the bad guy with keyboard inputs. 1. Input the code from the image above to one sprite. 2. Alter the code to create your own effects.
Step 5 What is the IF block and sensing block? The “if. . . then” block allows you to put in a condition. If happens, then this will happen! Using the drop down arrow select Bad Guy. Alternatively you could use the “touching colour” block.
Step 5 What is the IF block and sensing block? These scripts will give us a true or false response i. e. Good Guy is touching Bad Guy (True) or it is not touching Bad Guy (False). Now we can decide what will happen when the sprites touch. You can insert sound or looks.
Last Challenge 1. Plan a game on paper. It could be a chasing game as above, a maze or a football game or your own idea. 2. Create the game, using movement, sound, sensing and lives. 3. Have a look at other people’s games. Tell them what you like and suggest ideas to make their game even better!