Zmiany

Skocz do: nawigacji, wyszukiwania

Module 2 - The “Cat Chasing a Mouse” Project

Dodane 219 bajtów, 23:22, 6 lip 2015
We propose that students reduce the Mice sprite character and set up the characters so that they do not to hide behind each other. We remind them that we have already done this once.
{| class="wikitable" style="font-style: italic; margin: auto;"|- style="vertical-align:top;"
|[[Plik:Tip_ikonka.png]]
|'''Tip'''<br/>If necessary, we remind the students that to zoom in and out the sprite we use the icons:<br/>[[Plik:Scr_old_e_2_12.jpg]]<br/>We select them, and then click on the sprite until we get the desired size.
{| class="wikitable" style="font-style: italic; margin: auto;"
|- style="vertical-align:top;"
|[[Plik:Tip_ikonka.png]]
|'''Tip'''<br/>If someone chose the '''go to <mouse pointer>''' block, we discuss the difference this makes in how the scripts work. In this case the Mouse sprite is exactly where the mouse pointer is. So we cannot give it speed (which depends on how quickly we move the computer mouse). The Mouse sprite also does not rotate in the direction of the pointer.
{| class="wikitable" style="font-style: italic; margin: auto;"
|- style="vertical-align:top;"
|[[Plik:Tip_ikonka.png]]
|'''Tip'''<br/>At this point, it is worth showing the students that there are three behaviour options that can be set for every sprite. To show this we need to click the appropriate sprite in the sprite management area, and then select the '''i''' symbol:<br/>[[Plik:Scr_old_e_2_7.jpg|center]]<br/>Three behaviour icons will appear on the right side of the sprite. The first one: is used to make the spirit rotate in the direction in which it is looking (this is the default setting). The second icon: indicates that the sprite only rotates left – right, depending on the direction it is facing. If we select the last icon: the sprite will not rotate at all, regardless of the direction set.
{| class="wikitable" style="font-style: italic; margin: auto;"
|- style="vertical-align:top;"
|[[Plik:Tip_ikonka.png]]
|'''Tip'''<br/>It is worthwhile to discuss with the students whether a conditional instruction should be placed before or after the instruction '''Move by 2 steps'''. We can argue that the Mouse should first check whether it is touching the Kitten or not, because the Kitten may have caught it. If it moves first, it could manage to escape the Kitten, even though it has already been caught (touched).<br/>We should also discuss whether we should use the command '''Stop this script''' or '''Stop everything.''' The first one seems better because it is the Mouse which has been caught and so the Mouse should stop. The Kitten may still do things – for example say something or make a sound. That is why we should not use the command '''Stop everything,''' because in that case we would stop the whole programme immobilizing also the Kitten.
{| class="wikitable" style="font-style: italic; margin: auto;"
|- style="vertical-align:top;"
|[[Plik:Tip_ikonka.png]]
|'''Tip'''<br/>A common mistake at this stage is to place the block move by 2 steps in the condition if it touches the Kitten after the block stop this script. In this case the Mouse is stationary, because the movement will never be executed.
{| class="wikitable" style="font-style: italic; margin: auto;"
|- style="vertical-align:top;"
|[[Plik:Tip_ikonka.png]]
|'''Tip'''<br/>Because students may be unfamiliar with the Cartesian coordinate system, at this point we can give them a brief introductory presentation by drawing the coordinate system on the board. Then we show them how to read a given sprite’s position in Scratch.<br/>[[Plik:Scr_old_e_2_10.jpg|center]]
[[Plik:Scr_old_e_2_13.jpg]]
{|class="wikitable" style="font-style: italic; margin: auto;"|- style="vertical-align:top;"
|[[Plik:Tip_ikonka.png]]
|'''Tip'''<br/>Please note, that students should be made aware that if the Kitten says “I’ve caught the Mouse!” and immediately stops everything, it may happen that the Mouse script won’t have enough time to check that the Mouse is touching the Kitten and display “Oh, the Kitten has caught me!”. This is why it is worth using the following block in the Kitten script<br/>'''say <I’ve caught the Mouse!> for 2 seconds'''
197
edycji