Because our last lesson on animation was cancelled, I thought I’d post a lesson online that the kids could access over the Christmas holidays. This Scratch project(Julie’s Christmas Scene) is on the Scratch.MIT.edu website user:cdathenry1516, pw:cdathenry if you want to download it to your computer.
I searched the internet for Christmas Cartoon Images and saved a few to my computer:
Once I had all the images I wanted for Sprites, I opened SCRATCH and imported the Sprites From File but I noticed that each Sprite had a white background that blocked my nice backdrop. I decided to delete the background from each sprite.
I did this for all my sprites. Next I decided to make the dog wag is tail by
- Duplicating the doggie’s costume,
- using the select tool to select just his tail and then rotating the tail with the little button at the very top of the selection rectangle.
I did the same with Santa’s arm and his shoes. I just rotated them a bit in each costume, back and forth.
For the lights on one of the christmas trees, I just
- duplicated the tree costume 3 times,
- poured different colours into the round decorations in each costume.
Lastly, I scripted each of the Sprites like this:
That last script is for the doggie! You can script your Sprites in any way you would like. Can you put in a snowman and make him dance about? or bounce around. Can you have presents dropping from the sky like my snowflakes??
Christmas Pizza Party next week!!! Don’t forget to wear a santa hat and decorations! Bring your favourite scratch project and we’ll show the rest of the Dojo!
Operators in any programming language are used when you want to calculate something new: they operate on values. variables, or expressions to produce a new value.
As we have seen before, in ScriptCraft you use a drone to do your building for you. The drone has functions that are part of it.
Here are some of the main drone functions that are useful when building your mods:
You can find lots more about these and other functions in the ScriptCraft API Reference: https://github.com/walterhiggins/ScriptCraft/blob/master/docs/API-Reference.md
Example: Build a Pyramid
This example is based on a very nice program writing by Ruaidhri from Coderdojo Athenry last year, updated slightly because some ScriptCraft commands have changed in the meantime.
// Copyright Ruaidhri from ModderDojo Athenry,
// slightly updated by Michael and Alex.
// Builds a pyramid with entrance and lights inside.
exports.pyramid = function()
echo('making a pyramid');
var d = new Drone(self); // 'self' means start drone beside me
// Make the walls
while (size > 0)
// Lights inside
var t = 0;
t = t + 1;