Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lesson One Movement.

Similar presentations


Presentation on theme: "Lesson One Movement."— Presentation transcript:

1 Lesson One Movement

2 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

3 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

4 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

5 Try moving your sprite and then check out your x and y coordinates
FYI: Simply click and drag on the sprite to move him

6 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

7 Snap the code blocks together under your Event block.
Choose and drag in Snap the code blocks together under your Event block.

8 Choose and drag in This program says:
When I click the flag, put the sprite at these coordinates and make him visible.

9 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

10 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.

11 TIP: Always give your characters a “go to” command and a “show” or “hide” command at the start of any program.

12 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?

13 Straighten your sprite back out by clicking on the turn commands from your list.

14 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.

15 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

16 Choose and drag in

17 Choose and drag in Change to 100

18 Choose and drag in another

19 Choose and drag in Change to 90

20 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.

21 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

22 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.

23 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

24 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)

25 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

26 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.

27 Delete this code Split your code apart Then get rid of this

28 Move your cat to the upper right-hand corner

29 Your coordinates have changed to the new spot. Add to your code

30 Glide How is this different from the move code?

31 Try increasing the time on the glide.

32 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

33 Place a forever loop around the section that causes your sprite to move

34 Now he will repeat those actions until you end the program

35 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

36 Title your project here
How to save Title your project here Select File

37 How to submit 1. Make your project shared
2. You can add directions for your users here 3. Select Add to Studio

38 4. Choose the correct folder
How to submit 4. Choose the correct folder 5. Select okay

39 How to find all of your projects
Click on your name and My Stuff

40 You can also see everyone else’s work in the class studio

41 You can also submit to a class studio
from your My Stuff page

42 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

43 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

44 Click for individual lessons

45 Technology & Digital Design Lessons

46 Literature, Writing, & Grammar Lessons

47 Novels

48

49 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. 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.


Download ppt "Lesson One Movement."

Similar presentations


Ads by Google