Witch Shooter 2

Planning
Step 1
In this lesson, we will be adding a new enemy that will restart the score if it touches the player

We also will be adding a variable to keep track of the highest score achieved

1
Step 2
Add a new sprite be pressing this button in the bottom right
2

Then click on the enemy sprite of your choice. I chose Butterfly 2.

3
Step 3
If you need to flip the sprite to face the witch, then follow the video's steps

The Direction setting has an option for facing only left and right

Information
Step 4
We will make clones from the enemy sprite to spawn more than one at a time

The main enemy sprite will not move and be hidden to serve as a starting location, while the clones will be the visible ones trying to hit the player

4
Step 5
Add this code to the enemy butterfly sprite

This code will make the main sprite start in the correct place hidden and randomly spawn clones

5
Step 6
Then add this code to the butterfly sprite

This will make the clones appear and move to the left

6
Step 7
Add this if statement to the previous code inside the butterfly sprite

This will make the enemy clones disappear once they reach the left edge

7
Check Your Work
Step 8
Test your game

We should see enemy clones every so often that look like so:

Step 9
Add an IF statement to the previous code inside the enemy sprite

This will reset the score if the enemy touches the player

9
Step 10
Add another IF statement to the previous code inside the enemy sprite

This will destroy the enemy and add one to the score if an arrow hits the enemy

10
Check Your Work
Step 11
Test your game

Check to see if shooting an enemy gives you one point and being hit by an enemy resets your points to zero

Step 12
Add a new variable for the high score
11 12
Step 13
Now add this code anywhere to update the high score variable
13
Check Your Work
Step 14
The game is now complete!
1
Witch Shooter 2 Info

Account

MVCode Clubs

Created By

Missing tiny aaronjau101

Course:

Intro to Scratch: 1st/2nd Grade

Access Level

premium

For Teachers and Schools

Teach coding to your students with MVCode Teach

MVCode offers an integrated product designed to teach coding to students.

Learn more about MVCode Teach