Welcome to Scratch Week D! We'll make a game where you get chased by a ball. Hope you can run fast.
1. Go to sprites and get the Ball.
2. Go to Events and get a "when Green Flag clicked". Green Flag in this case will be a literal green flag. Drop it onto your code canvas.
(Note: for the rest of these steps I accidentally put all the code in the cat sprite, but you should be putting them in the ball sprite!)
3. Put a "forever" under your "when Green Flag clicked".
4. Inside the "forever", put a "create a clone of myself" in it. It's in Control.
5. Under that last one, put a "glide 1 secs to x: y:" in the "forever".
6. Change "1" to "0.5".
7. Go to "Sensing" and drag and drop "mouse x" over the "x:" part and "mouse y" over the "y:" part.
8. Now, drag and drop a "forever" and place it on an empty part of the Ball's code canvas.
9. Inside that "forever", put an "if" statement in it.
10. In between the "if" and "then" part, go to Operators and fine the green one that's like "( ) < 50" and drag and drop it in the conditional part of your "if".
11. Go to "Sensing" and drag and drop "distance to mouse-pointer" into the left side of the green block.
12. In the right side of the green block, type in the number 23. I tested it out and 23 seems like a good number for hit detection.
13. Inside your "if" block, drag and drop a "stop all" from "Control". Make sure to save your program!
14. Copy and pastes your entire "forever" code that you just made. To do that, right-click the "forever" part and then click "duplicate." You should have two now.
15. For the first one, put a "when Green Flag clicked" from "Events" at the very top of the block.
16. For the second one, put a "when I start as a clone" from "Control" at the very top of the block.
17. Now click the Green Flag, move your mouse cursor over to the Stage Area and see how long you can last!