Lesson One Movement
Skills Triggering a program with an event code block Positioning sprites using go to, move, glide, x and y coordinates, turn, and point in direction code blocks Using control codes such as the wait command and the forever loop Using the show and hide code blocks Saving your work and submitting projects to a class folder within Scratch. To set up a class studio so that you can monitor student work, click here
Play Stop Script Editor Code Blocks Stage Controls for sprite (keep in mind that changes made here are not part of your program unless you also add code blocks for them) Get Backdrop Get Sprite
Placement X-axis = horizontal plane Y-axis = vertical plane This cat is at x = 0; y =0 x = 120; y = 90 x = -120; y = 90 x = 0; y = -90 x = 120; y = -90
Try moving your sprite and then check out your x and y coordinates FYI: Simply click and drag on the sprite to move him
FYI: Events are triggers that signal an action in your program Choose and drag in FYI: Events are triggers that signal an action in your program
Snap the code blocks together under your Event block. Choose and drag in Snap the code blocks together under your Event block.
Choose and drag in This program says: When I click the flag, put the sprite at these coordinates and make him visible.
FYI: If you lose your cat, change your coordinates back to x:0 and y:0 Try entering different coordinates. Click the flag and see what happens. FYI: If you lose your cat, change your coordinates back to x:0 and y:0
Move the cat around your stage and check out what happens to the numbers in the motion code box FYI: You can move your cat to where you want it, and the code will automatically adjust for you. However, the information is not stored in your program unless you drag the block into the script editor.
TIP: Always give your characters a “go to” command and a “show” or “hide” command at the start of any program.
Movement Click on this command under What if you change the number to 100? What if you change the number to -100? What happens if you click on this command? What if you change the number to 360? What if you change the number to 90? What does this one do?
Straighten your sprite back out by clicking on the turn commands from your list.
Straighten your sprite back out by clicking on the turn commands from your list. Remember: We can manipulate our sprite from this list but it is not a part of our program unless we drag the code into our script editor.
Your sprite has different rotation styles Use this code block to program your sprite to face a certain direction (adjust the number) Play with this number and try the different rotation options
Choose and drag in
Choose and drag in Change to 100
Choose and drag in another
Choose and drag in Change to 90
Choose and drag in This program now says: When I click the flag, put the sprite at these coordinates and make him visible. Wait 1 second. Move him forward 100 steps. Wait 1 second. Turn him forward 90 degrees.
He should move forward and then fall down like this Click your flag to play the program He should move forward and then fall down like this
What happens when you click your flag to play the program again? We haven’t programmed our cat to start out standing up! So he pivots further and further every time we run the program.
We hide him and then turn him back upright Here is the fix We add wait 1 second We hide him and then turn him back upright
Here is the fix The end of our program now says: Wait 1 second and then hide him. While he is hidden, turn him back upright. (We don’t want to see him pop back up)
Put your code back together and play it Try removing that last Split your code apart Then get rid of this Put your code back together and play it
Now the two turn commands are cancelling each other out because without the wait command, they are happening simultaneously. He no longer falls. FYI: If we didn’t have our “show” code at the beginning of the program, he also would have stayed hidden when we restarted the program.
Delete this code Split your code apart Then get rid of this
Move your cat to the upper right-hand corner
Your coordinates have changed to the new spot. Add to your code
Glide How is this different from the move code?
Try increasing the time on the glide.
Move by changing X or Y coordinates Remove Replace it with this command Add a wait This is a very tiny movement, so try changing each to 100 Add movement on the y-axis
Place a forever loop around the section that causes your sprite to move
Now he will repeat those actions until you end the program
Loops Forever – runs until you hit stop Repeat – repeats the number of times you indicate Repeat Until - stops when a condition is fulfilled If Loops - runs only if a condition is fulfilled These need operator code blocks – we will get to those in a later lesson
Title your project here How to save Title your project here Select File
How to submit 1. Make your project shared 2. You can add directions for your users here 3. Select Add to Studio
4. Choose the correct folder How to submit 4. Choose the correct folder 5. Select okay
How to find all of your projects Click on your name and My Stuff
You can also see everyone else’s work in the class studio
You can also submit to a class studio from your My Stuff page
Your Turn! Write a program that includes: A sprite Movement A forever or a repeat loop Submit to Lesson 1 in the class studio. TIP: Always begin a program by setting up a trigger and the sprite’s starting position
12-Lesson Discounted Bundle Bonus Files Final project with Guidelines Rubric Reflection Assignment Student Support Website A support page for each lesson to aid students while working independently https://www.teacherspayteachers.com/Product/Computer-Coding-in-Scratch-10-Lessons-BUNDLE-3870547
Click for individual lessons
Technology & Digital Design Lessons
Literature, Writing, & Grammar Lessons
Novels
https://www.teacherspayteachers.com/Store/Miss-Bs-Shop
Terms of Use & Credits By downloading this product you are given permission for classroom and personal use only. You may alter and modify this work for your own use, but please do not share, sell, or post online. Please consider rating this resource. Your ratings earn you TpT credits to apply discounts towards future purchases. Use the link to go to the “My Purchases” tab and rate any products you have downloaded. Note that there is a separate “paid downloads” and “free downloads” tab. https://www.teacherspayteachers.com/My-Purchases Cover art from Tangerine by Edward Bloor. Copyright ©1997 by Edward Bloor. Reprinted by permission of Houghton Mifflin Harcourt Publishing Company. All rights reserved. All other images in products and on cover art (thumbnail images) were found in the public domain. The public domain consists of all the creative works to which no exclusive intellectual property rights apply. Those rights may have expired, been forfeited, expressly waived, or may be inapplicable. Screenshots that are taken from Adobe CC Suite, Microsoft Office Suite, iMovie, and Scratch are in compliance with Fair Use guidelines.