We will be well on our way to present our games at the STEM fest with this homework! Please email Michael if you feel that you need help.
What I want you to get out of the assignment is that when you use glide you go from point A to pt B and you can’t effect the sprite as it glides. But if you use a loop and decrement the y position you can now put an if statement in the code. You already have all the code from the last class.
Please keep on working on your game for the STEM fest.
I have shared a project that you can use for the exercise. If you go to backdrops, you can find a background of an x-y axis. You might find this helpful.
1. Make an x and y axis on paper and plot the the following point (0,0), (1,1), (-3,-2), (5,-2)
Please use the shared link for the rest of the homework. The ball has two costumes: a blue and yellow costume.
2. In Scratch, make the ball go to (100,100) using the blue costume.
3. Now make the ball go from (100,100) to (100, -100) using the glide command.
4. Now, what if we want the costume to change from blue to yellow when the y value is between 50 and -50. If the ball is outside of 50 and -50, it should go back to blue. Can we do this using glide? Why not?
5. Instead of using glide you can use a loop to move the ball. How do we have the costume change as specified in part 4?
Below is a representation of how the ball color should be changing based on its height.
Blue —- change happens when y value is below 50
Blue —- change happens again when y value drops below -50