The Salmon of Knowledge

ScratchSESEHard

In this lesson we will create the Salmon of Knowledge story and use the 'message' blocks to time when the characters say their lines.

1

Create a new Scratch project

Create a new Scratch project and delete the cat sprite by right clicking on the cat and then clicking on the 'delete' option in the menu that appears.

https://scratch.mit.edu

2

Create the title backdrop

We want to show the title 'The Salmon of Knowledge' at the start of the story. We'll do this by editing the backdrop and putting some text in.

  1. Click on the Stage backdrop in the bottom left of the project editor.
  2. Then click on the 'Backdrops' tab at the top of the Block Palette. This displays the backdrop editor.
  3. Rename the backdrop to 'title'.
  4. Click the 'Convert to vector' button.
  5. Select the text tool by clicking the T button.
  6. Choose a colour for your text from the colour palette.
  7. Click on the top of the back drop to add your text there.
  8. Type 'The Salmon of Knowledge' and then click anywhere on the screen.
  9. Make the text a bit bigger by dragging a corner of the bounding box.
  10. Move the text into the middle of the backdrop (but still at the top).

3

Create a 'The End' backdrop

Create a 'The End' backdrop by clicking the Paint new backdrop button (Highlighted in yellow in the image on the right). Then follow the same steps you did for the title backdrop but this time type the text 'The End'.



4

Add a castle and a river backdrop

Now that we've created the title and The End backdrops, we need to add the backdrops that we will show in the story. Follow these steps to add in a backdrop for a castle and a river.

  1. Click the Choose backdrop from library button (highlighted in yellow in the image on the right).
  2. Find the 'castle3' or the 'lake' backdrop.
  3. Select the backdrop.
  4. Click OK.



5

Add the characters

Our story will have four characters:

  1. Fionn mac Cumhaill (young boy)
  2. Finnegas (wise man)
  3. The Salmon of Knowledge
  4. Abby (the narrator)

Add the Abby and Fish1 sprites from the sprite library.

Images for Fionn and Finnegas are provided with this lesson. Follow these steps to save them to your computer and then upload them into your Scratch project, remember you will need to do these steps for both the Fionn character and the Finnesgas character.

  1. Right clicking on the character image that's displayed with this step.
  2. Click 'Save image as...'
  3. Choose a location on your computer to save the file to.
  4. Click 'Save'.
  5. Click the upload sprite button (highlighted in yellow in the figure on the right).
  6. Go to the location on your computer that you saved the character image.
  7. Select the character image.
  8. Click 'Open'.





6

Hide all the characters

At the start of the story all the characters will be hidden. We also want to resize the charcters so they fit and place them in their starting positions. Add the following code to each character (note you will need to change the size and the X, Y position using the below table):

  1. events when clicked 
  2. looks hide 
  3. looks set size to 100 % (change this using the table below)
  4. motion go to x: 0 y: 0 (change this using the table below)
CharacterSizeXY
Fionn30%-9-100
Finnegas50%162-54
Abby70%-200-95
Salmon40%77-52

7

Start the story

The story will start when the green flag is clicked. We'll show the title backdrop, wait 3 seconds and then broadcast a message called 'message1'. A message that is sent can be received by all sprites and they can carry out instructions when they receive that message.

Add the following code to the backdrop:

  1. events when clicked 
  2. looks switch backdrop to [title] 
  3. control wait 3 secs 
  4. events broadcast [message1] 

8

The plot

The following is the plot of the story. We'll use this plot to program the characters to say their lines at the right times by using the 'broadcast message' and 'when I receive message' blocks.

In each row of the following table, add the code to the stated character. You will need to create the new messages by clicking on the black arrow in the 'broadcast message' block and selecting 'new message...'.

Every so often, test your code by clicking on the green flag to check that the timing and sequence of the characters saying their lines is correct. If it's not you'll need to check your code to see if there is a mistake.

CodeDialogue

Abby:
Events > when I receive message1
Looks > show
Events > broadcast message2

* Abby appears *

Fionn:
Events > when I receive message2
Looks > show

* Fionn appears *
Abby (add to bottom of 'when I receive message1'):
Looks > say [] for [5] secs
Events > broadcast message3
Abby - "This is a story about Fionn mac Cumhaill, the great leader of the Fianna of Ireland."
Finnegas:
Events > when I receive message3
Looks > show
* Finnegas appears *
Abby (add to bottom of 'when I receive message1'):
Looks > say [] for [5] secs
Abby - "Long ago when Fionn was still a young boy he was sent to live with a very wise man named Finnegas."
Abby (add to bottom of 'when I receive message1'):
Looks > switch backdrop to castle3

* Show castle backdrop *
Abby (add to bottom of 'when I receive message1'):
Looks > say [] for [5] secs
Abby - "Fionn had been sent to learn from Finnegas because of his vast knowledge."
Abby (add to bottom of 'when I receive message1'):
Looks > say [] for [5] secs
Abby - "In exchange for the wisdom of Finnegas, Fionn would help with cooking, cleaning and fishing for the old man."
Abby (add to bottom of 'when I receive message1'):
Looks > say [] for [5] secs
Abby - "Finnegas lived on the banks of the river Boyne and was renowned throughout Ireland for his vast knowledge."

Abby (add to bottom of 'when I receive message1'):
Looks > say [] for [8] secs
Events > broadcast message4

Abby - "However, despite Finnegas’ vast knowledge, he did not know everything and there were times when Fionn’s endless curiosity got the better of him, and he was left unable to answer the young boy’s questions."
Fionn:
Events > when I receive message4
Looks > say [] for [4] secs
Events > broadcast message5
Fionn - "Finnegas, is there a way to know everything?"
Finnegas:
Events > when I receive message5
Looks > say [] for [5] secs
Finnegas - "Ah! That is the very reason why I live next to the river Boyne!"
Finnegas (add to bottom of 'when I receive message5'):
Looks > say [] for [5] secs
Finnegas - "There is a salmon that lives in this river that has all the knowledge of the world."
Finnegas (add to bottom of 'when I receive message5'):
Looks > say [] for [5] secs
Events > broadcast message6
Finnegas - "Whoever catches and eats the salmon will gain all that wisdom!"
Abby:
Events > when I receive message6
Looks > switch backdrop to lake
* Show river backdrop *

Fionn:
Events > when I receive message6
Motion > go to x: [-8] y: [-12]

* Fionn moves position *
Finnegas:
Events > when I receive message6
Motion > go to x: [160] y: [25]

* Finnegas moves position *
Abby (add to bottom of 'when I receive message6'):
Looks > say [] for [5] secs
Events > broadcast message7

Abby - "And so one day when Finnegas was fishing he caught the Salmon of Knowledge!"

Salmon:
Events > when I receive message7
Looks > show
* Salmon of Knowledge appears *
Salmon (add to bottom of 'when I receive message7'):
Looks > think [] for [4] secs
Salmon of Knowledge - "E = MC2"
Finnegas:
Events > when I receive message7
Looks > say [] for [5] secs
Events > broadcast message8
Finnegas - "I've caught it! I've finally caught the Salmon of Knowledge!"
Abby:
Events > when I receive message8
Looks > say [] for [5] secs
Events > broadcast message9
Abby - "They built a fire and started to cook the Salmon of Knowledge."
Finnegas:
Events > when I receive message9
Looks > say [] for [5] secs
Finnegas - "I will go collect some more fire wood."
Finnegas (add to bottom of 'when I receive message9'):
Looks > say [] for [5] secs
Finnegas - "Cook the fish but do not eat a single bite of it!"
Finnegas (add to bottom of 'when I receive message9'):
Motion > glide [1] secs to x: [300] y: [25]
Events > broadcast message10
* Finnegas leaves *
Fionn:
Events > when I receive message10
Looks > say [] for [5] secs
Fionn - "I'll turn the fish over to cook the other side."
Fionn (add to bottom of 'when I receive message10'):
Motion > glide [1] secs to x: [36] y: [-19]
* Fionn goes to the fish to turn it over *
Fionn (add to bottom of 'when I receive message10'):
Looks > say [] for [3] secs
Events > broadcast message11
Fionn - "Owww my thumb!!"
Finnegas:
Events > when I receive message11
Motion > glide [1] secs to x: [175] y: [16]
* Finnegas returns *
Abby:
Events > when I receive message11
Looks > say [] for [5] secs
Abby - "When Finnegas returned with the firewood he thought he noticed something different about Fionn."
Finnegas:
Events > when I receive message12
Looks > say [] for [5] secs
Events > broadcast message13
Finnegas - "Have you eaten any of the Salmon?"
Fionn:
Events > when I receive message13
Looks > say [] for [5] secs
Events > broadcast message14
Fionn - "I have not!"
Finnegas:
Events > when I receive message14
Looks > say [] for [5] secs
Events > broadcast message15
Finnegas - "Have you tasted its skin?"
Fionn:
Events > when I receive message15
Looks > say [] for [5] secs
Fionn - "I have not!"
Fionn (add to bottom of 'when I receive message15'):
Looks > say [] for [5] secs
Events > broadcast message16
Fionn - "But when I was turning it over I burnt my thumb, so I put it into my mouth to ease the pain."
Finnegas:
Events > when I receive message16
Looks > say [] for [3] secs
Finnegas - "That is enough!"
Finnegas (add to bottom of 'when I receive message16'):
Looks > say [] for [5] secs
Finnegas - "You have tasted the Salmon of Knowledge. You are the one who has gained all the knowledge of the world."
Finnegas (add to bottom of 'when I receive message16'):
Looks > say [] for [5] secs
Finnegas - "You must go now! There is nothing more I can teach you."
Finnegas (add to bottom of 'when I receive message16'):
Looks > say [] for [5] secs
Events > broadcast message17
Finnegas - "You are destined to become a wise poet, warrior and leader."
Abby:
Events > when I receive message17
Looks > say [] for [10] secs
Abby - "And so it was that when Fionn grew up, he did indeed become a wise poet, warrior and leader. He became a great leader of the Fianna, the greatest band of warriors Ireland has ever known."
Abby (add to bottom of 'when I receive message17'):
Looks > switch backdrop to the end
* show The End *




9

Watch your finished story

Now that you've programmed all the characters and their lines, change the view to full screen and click the green flag to watch your finished story. If you think you need need to change the length of time a characters speech bubble appears then go and change it in your code.


End of lesson
Copyright Notice
This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.

Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu