Getting an Account


First, click on Join Scratch. It will take you to a screen to make your Username and Password. Then select your country, like Puerto Rico for example. Then input your birthday and gender. Then have your parent put in their E-MAIL so they can approve your account. Now you have a SCRATCH account!
Coding your first Animation

Click on the Create button. It will take you to the project editor. Before you begin, let us go over some vocabulary.
- Sprite = what you are coding
- backdrop/stage = background
- Backpack = where you store sprites, sounds, and costumes
Now that you know the vocabulary, lets start coding. Delete the cat by clicking the trashcan button in the top-right corner. Rename the project something about wizards, like “Wizard battle” or “Wizard Duel”. Then press the button that looks like (🐱+). That is the “Add Sprite” button. Click on the magnifying glass. Click on (Fantasy), then scroll down and click on the sprite “Wizard Girl”. On X(0) Y(0), type in the coordinates X(-145) Y(16). Make the size size (75). Then add the Witch sprite and make the coordinates X(145) Y(16) and Size (75). In the Witch, click on the direction and click on the [<>]. Type in direction (-90). Click on the sprite “Wizard Girl” in the sprite menu down below. In the right hand menu, click on 🟡Events. Drag the block (When [SPACEv] key pressed) into the white area. Click on the [SPACEv] part and click on a. Click on [Costumes]. Hold the box on the left and click “Duplicate”. Click on the ⚫️. In the (🟪v ⬛️v), click on the 🟪 and make the color 14 and the saturation 100. Make a circle on the wand by dragging in the costume area. Duplicate Wizard Girl2, click the circle, hold shift, and click your keyboard ➡️ 2 times. Keep duplicating and moving the circle until the circle is touching the witch on the stage. Then in the Sprites menu, click on the “Looks” menu and click [Go to [FRONTv] layer] and the wizard will go to the front. Where the (When [Av] key pressed) is, drag a [switchcostume to (wizard girl v) ] from the LOOKS menu. Go to the Control (orange) menu and add a [wait (1) seconds] block. Change the (1) to a (0.2) and drag a [repeat (10)] loop. Change the (10) to a (14). Go to the LOOKS menu and add a [next costume] block inside the loop and under the [next costume] block, put a [wait (.01) seconds] block. UNDER the loop, put a [switch costume to (wizard girl v) ] block. THE CODING IS COMPLETE! To test your animation, press A on your keyboard. To make it mobile (phones and tablets) friendly, hold the [when [a v] key pressed and duplicate it. Drag the switch costume block out of the hat block (the yellow one). Replace it with a [when this sprite clicked] block from the yellow menu. This is what the finished code should look like (down below). Click on [🔃 See Project Page]. In the instructions, type Press A or the Wizard. (<- you can copy and paste this.)You can edit the wait blocks for a faster or slower animation. If you want it on Turbo mode, click the pencil at the top and click Turn on TURBO mode. Here is the example project.

Updating your project
Sometimes, you should do some updating. This update is to make health variables and to make the witch cast spells. Go to the Variables menu (orange). Hold (my variable) and rename it to Player Health. Click the box next to it to make it show. Make a new variable called Witch Health. Check the box “For all sprites”. Go into the stage. Drag in a When (green flag) clicked. Go into the orange menu and drag in 2 [set [Player Health v] to (0)] blocks. Make both of the (0) to (2000). They should say [set [Player Health] to (2000)]. Make one a [set [Witch Health v] to (0)] by clicking on the “v”. Drag them under the When Green Flag Clicked hat block. Click the green flag at the top. Now go to the (🐱+) and add a wand. Drag in a [forever] loop. Go to the blue menu and add a [go to (random position) ] block. Click on (random position v) and make it say (witch v). Add a “when green flag clicked” hat block at the top, then click the green flag. Go to the costumes. Hold [shift] on your keyboard and press the wooden handle and the star, then press “group” at the top. Hold [shift] and keep pressing the left arrow on your keyboard to make it look like the witch is holding the wand. You might need to rotate it and press the up arrow a couple times. Add a “Lightning” sprite, and hide it. Go back to the wizard girl, and add a [broadcast (message1 v) ] block under “when this sprite clicked” and “when A key pressed”. This is the code so far.



left-wizard | middle-wand | right-lightning
Go to “lightning” and add a “When I recieve message1” block. Add a “wait 1 second” then a “show”. Under it, add a Glide 1 Second to Wizard girl. Then hide. Go to the wizard. Make a script that says “When green flag clicked
set witch health to 2000
set Player Health to 2000
Forever
If <touching [Witch] > then
Change [Witch Health v] by (-10)”
That way, when you cast a spell, it damages the witch. Likewise for the lightning bolt, but the variable going down is the Player Health.
Variables and MY BLOCKS menus
The MY BLOCKS menu is for the pros. Go to the lightning bolt. Click on My Blocks, then Make a Block. Make the name Damage Wizard. Check []Run without screen refresh. That makes it so it updates the code immediatly. Under define Damage Wizard, do the following code:
If <touching (Wizard Girl v) ?> then
change Player Health by -10
Make another hat block
When green flag clicked
forever
Damage Wizard
If you want to, you can change the stage to something else.
Here is the link to my updated example.
At the bottom, there is a white box titled Backpack. It lets you bring sounds, sprites, and costumes into your other games. To utilize it, just click it and drag whatever sprite/sound/costume you want to bring to your other game. Then go to that game and drag it into the sprite/sprite area and it will add it to your project.


Left–Variables/Lists (lists use variables–thats’s why they’re in there!) right–My Blocks