260 likes | 385 Views
Introducing Scratch. Learning resources for the implementation of the scenario. Purpose and contents. Present the stages of the learning scenario entitled “ Introducing Scratch ”
E N D
Introducing Scratch Learning resources for the implementation of the scenario
Purpose and contents Present the stages of the learning scenario entitled “Introducing Scratch” Provide additional resources designed to support the teacher and student in learning how to develop and use this scenario
The stages of the scenario Make a sprite move according to the arrow keys pressed Show function of „when … key pressed” Make an other sprite move randomly Show importing premade sprite to the project Show function of „glide …” Handle the event of „catch” Show functions „forever”, „if”, „broadcast”, „play”, „say” Show nesting of functions Changing background picture
Stage 1. Make a sprite move according to the arrow keys pressed
Make a sprite move (1/2) Open Scratch and select the cat sprite Start with this code Select certain key Press on the green flag and see what happens if you use the selected button
Make a sprite move (2/2) Add keys to other directions(down, left, right) Rewrite related parameters(use the „change …” function) Press on the green flag and see what happens if you press certain buttons
Stage 2. Make an other sprite move randomly
Make an other sprite move randomly(1/3) Choose new sprite from file Select the mouse sprite
Make an other sprite move randomly(2/3) Start with this code Use „show” function to present sprite of the mouse Use „glide …” with parameters chosen randomly
Make an other sprite move randomly(3/3) Use „pick random …” function to get random number from a range You have to evaluate two random numbers to x and y directions Press on the green flag and see what happens
Stage 3. Handle the event of „catch”
Handle the event of „catch”(1/5) Select the cat sprite to get its script Add „if” with condition „touching” Select touching object from the list
Handle the event of „catch”(2/5) Add „broadcast …” to send an event message to all other objects Add „play sound …” to hear sound Add „say …” to get written message on the screen
Handle the event of „catch”(3/5) Embed „if” into a „forever” function Press on the green flag and see what happens
Handle the event of „catch”(4/5) But who will get the event message? Select the mouse sprite to get its script Add „when I receive …” function and select „catchYou” message
Handle the event of „catch”(5/5) Use „hide” to clear mouse sprite from the screen and „wait” for waiting for the new stage background Use „go to …” function to the new starting position of mouse spirit Use „show” function to get mouse sprite Press on the green flag and see what happens • When the mouse gets the event message, then …
Stage 4. Changing background picture
Changing background picture (1/5) You need to change the background picture when the cat catches the mouse Select „Stage” to get its script
Changing background picture (2/5) Select „Backgrounds” tab You can add new backgrounds by clicking on „Paint”, „Import” or „Camera” buttons
Changing background picture (3/5) Click on „Import” button Select suitable background picture from the list
Changing background picture (4/5) Click on „Scripts” tab to get its script Start with this code • Add „catchYou” parameter to „when I receive …” function • Add „wait …” function • Add „next background” to change picture
Changing background picture (5/5) When the cat sprite catches the mouse, this generates „catchYou” event message This message can be captured by the mouse sprite and the background called „Stage” You can see four different pictures as the event message has been captured by the „Stage”