Project: Midnight Snack for Ratty

Hello, Chris at Kano here!

The Harry Potter Kano Coding Kit, is a great tool for creating your own stories with code, using the locations, creatures, objects, sounds and spell motions of the Wizarding World. πŸ§™β€β™‚οΈπŸ§€πŸ€

Here's one that I made, about a hungry Hogwarts Rat, and his love for cheese! πŸ§€πŸ€

Let's build it together. πŸ—οΈ

Step 1

Start off by clicking the New Creation button (highlighted in blue) on your Profile.

This opens up a blank coding window with every object, sound, and spell motion unlocked.

Step 2

Click the background button (highlighted in blue) to choose a background.

For this creation, I chose the Great Hall (highlighted in blue).

Once you've selected your background, it appears in the Canvas on the right of your screen.

Step 3

We're almost ready to start adding code blocks!

All of the code blocks in the Harry Potter Kano Coding kit are kept in trays on the left of your screen (highlighted in blue). Check out the coloured dots next to the trays - those will be important later!

For this creation we'll be using Speaker code blocks to make sounds.

The Speaker parts aren't in the trays on the left yet, so we need to add them in.

To do this, click on the add parts button (highlighted in blue).

Then click on Speaker (highlighted in blue).

Now you'll be able to find any speaker code blocks you need in the Speaker tray on the left side of your screen (highlighted in blue).

Step 4

Time to code!

Here's what we're going to create.

All of the code blocks are in the trays on the left of your screen. Match the colour of the blocks in the images below with the colour of the dots next to the trays to find the blocks you need!

Step 5

Start by connecting the code blocks below. You'll find the blocks you need in the Events and Objects trays on the left of your screen.

This piece of code creates a Rat, and a piece of Cheese. The piece of Cheese is set to be really small (0.5), so that you can't see it.

Step 6

The second piece of code is activated by the Accio spell motion

It makes the piece of cheese big enough to see, (creating the illusion that it appeared from nowhere!), plays a Pop! sound, and makes the Coding Wand rumble.

You'll find the code blocks you need in the Events, Objects, Wand, and Speaker trays on the left of your screen (the orange sound effects blocks are also in the Speaker tray!).

Step 7

The third piece of code is activated by the Locomotor spell motion.

Every frame, it sets the X (left and right) position of the rat, to the X (left and right) position of your Coding Wand.

The blocks you need for this piece of code are in the Events, Control, Objects, and Wand trays on the left of your screen.

Step 8

The fourth piece of code shrinks the piece of Cheese, plays a Squish! sound, and makes your Coding Wand rumble each time the Rat and Cheese collide.

The blocks you need for this piece of code are in the Events, Objects, Wand, and Speaker trays on the left of your screen.

Step 9

The fifth piece of code creates yellow and orange particles on the screen, and removes the Rat, and the Cheese with a Pop!

The blocks you need for this piece of code are in the Events, Particles, Objects, and Speaker trays on the left of your screen.

Step 10

The sixth piece of code creates green and purple particles on the screen, and restarts the code (creating a new Rat, and a new, tiny, piece of Cheese) with a Pop!

The blocks you need for this piece of code are in the Events, Control, Particles, and Speaker trays on the left of your screen.

Step 11

We're done!

Don't forget to Save your creation to Kano World so that everyone can see what you've made.

Click on the save button (highlighted in blue).

And then add a name and a description that lets people know what your creation does, and how they can play with it!

I'm looking forward to seeing your well fed rats, all over Kano World.

Mischief Managed!

Chris (TyrantLizardRex)
Gryffindor

More from Chris Mann