More Sprite Drawing and Interaction

  1. "U1L2-SpriteChase2"Create a new project called U1L1-SpriteChase2
  2. Start with one sprite and give it these scripts:
    You don't need to add the comments that are in yellow boxes on the side.
    But you can add comments to any script by right-clicking (or control-clicking) on the scripting area's gray background picture of gray background and selecting "add comment."
    New sprite chase script
  3. Now duplicate that sprite by right-clicking (or control-clicking) on the sprite's button below the stage (not the sprite itself) and selecting "duplicate".
    Earlier, you created a brand new sprite using add a new turtle sprite. That sprite had no scripts because it was brand new. This time, you duplicated an existing sprite. So, the duplicated sprite gets all the code that the original sprite had.
    duplicating a sprite
  4. Change Sprite(2)'s scripts so that it will set the pen color to red, point in direction 180, and move 5 (not -5) steps.
  5. Change Sprite(2)'s scripts so that it points towards Sprite. Then change Sprite's scripts so that it points towards Sprite(2).
  6. What happens when the "r" key is pressed?
  7. What happens when the "space" key is pressed?
  8. Experiment: Change Sprite's scripts so that it backs away only 4 steps instead of 5. Reset and start the program again to see what happens.
  9. Talk with Your Partner Discuss what happens and why.