Olaf Snowball Shooter Part 1

Step 1
Follow this link and remix the Scratch project.
Step 2
Click on the Sprite called Player Snowball. This is the first sprite that we will work on.
Temp1405389882

Step 3
Add this block of code to the Player Snowball Sprite.
Temp1405389988

Step 4
Also add these two blocks of code to the Player Snowball Sprite. This allows us to shoot snowballs and animates our snowballs.
Temp1405390820

Step 5
This is what you should be able to do so far.
Step 6
Now lets move on to adding some code to our Olaf Sprite.
Temp1405391286

Step 7
We will start off by adding this to Olaf.
Temp1405391495

Step 8
Make a new variable and name it Score.
Temp1405392223

Step 9
Once you have created the Score variable, add this block of code to the Olaf1 sprite. This is what will animate Olaf.
Temp1407961822

Step 10
This block of script is what will tell Olaf to stop throwing snowballs once he gets hit.
Temp1406593835

Step 11
Now it is time to add some script to Olaf's snowball.
Temp1406593911

Step 12
This block of code will determine the snowballs starting place and will create a clone of itself.
Temp1407961624

Step 13
Adding these two blocks are what make the snowball move towards the player.
Temp1406594258

Step 14
And lastly, this is what will stop the snowballs from being thrown once Olaf is hit.
Temp1406594455

Step 15
Now lets duplicate Olaf twice so that there are 3 Olaf sprites.
Temp1406594657

Step 16
Select Olaf2
Temp1406594718

Step 17
Inside the Olaf2 sprite, change the broadcast to Olaf dead 2
Temp1406594993

Step 18
Now select olaf3
Temp1406595060

Step 19
And change Olaf3's broadcast to olaf dead 3
Temp1406595125

Step 20
Now duplicate the olaf snowball sprite twice so that there are 3 olaf snowball sprites.
Temp1406595216

Step 21
Now select the second Olaf snowball sprite.
Temp1406595488

Step 22
In the second olaf snowball sprite, change the number in the wait block to 9.
Temp1406595343

Step 23
Also in the second Olaf snowball sprite, change the "When I receive" block to "olaf dead 2"
Temp1406595437

Step 24
Lastly, select the third Olaf snowball sprite.
Temp1406595547

Step 25
In the third Olaf snowball sprite, change the number in the "wait" block to 13.
Temp1406595651

Step 26
And finally, change the "When I receive" message to Olaf dead 3.
Temp1406595870

Step 27
This is how your game should look so far.
Step 28
Temp1407962297

Olaf Snowball Shooter Part 1 Info

Account

MVCode Clubs

Created By

Img 0819 teddy

Access Level

public

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