· Web viewDuck Shooter. In Scratch you can create a duck shooter game by following these...

3
Duck Shooter In Scratch you can create a duck shooter game by following these steps Step 1: Create 2 sprites A crosshair. You will control this using your keyboard and use it to shoot your duck A duck. This will fly through the sky. You might want to add a 2 nd costume to your duck with its wings in the air. Play these together and it will look like its flying. Step 2: Controlling the cross hair This will set the position of the crosshair to the middle of the screen These scripts move the crosshair using the up, down, left and right arrows Step 3: Making the duck fly This script makes the duck go to x-350 (off the screen to the left) and a random position on the y axis.

Transcript of · Web viewDuck Shooter. In Scratch you can create a duck shooter game by following these...

Page 1: · Web viewDuck Shooter. In Scratch you can create a duck shooter game by following these steps. Step 1: Create 2 sprites. A crosshair. You will control this using your keyboard

Duck ShooterIn Scratch you can create a duck shooter game by following these steps

Step 1: Create 2 sprites

A crosshair. You will control this using your keyboard and use it to shoot your duck

A duck. This will fly through the sky. You might want to add a 2nd costume to your duck with its wings in the air. Play these together and it will look like its

flying.

Step 2: Controlling the cross hair

This will set the position of the crosshair to the middle of the screen

These scripts move the crosshair using the up, down, left and right arrows

Step 3: Making the duck fly

This script makes the duck go to x-350 (off the screen to the left) and a random position on the y axis.

It then repeats “Change x by 10” until x is more than 240. This will move the duck across the screen until it reaches the right edge

Page 2: · Web viewDuck Shooter. In Scratch you can create a duck shooter game by following these steps. Step 1: Create 2 sprites. A crosshair. You will control this using your keyboard

Step 4: Shooting the duck

This goes on the cross hair

When the space bar is pressed it senses if the cross hair is touching the duck. If it is, it will broadcast the word “Hit”

This goes on the duck sprite

When the duck receives the word “hit” (once the space has been pressed when the cross hair is on top of the duck) the duck will fall to the ground. It will then reset its position on the left of the screen and fly again.

Extension Tasks

Create a score that counts how many ducks you have shot Create more ducks (smaller/faster ones for a bigger score) Create a timer so the game only lasts 60 seconds.