Wednesday, September 30, 2015

The Forever Block

As the name "forever" implies, the forever block will run the blocks inside it again and again and again and again... forever. You can stop one script by clicking on it again. You can stop all scripts by clicking on the stop sign at the top right corner of the Snap! window. This is equivalent to executing the stop all block in the "Control" palette.
  1. Talk with Your Partner What do you think this script will do?
    Chase That Mouse Script
  2. Build that script and click it to experiment with the sprite movement when you move the mouse pointer over the stage.
  3. Mouse X Reporter and Mouse Y Reporter are reporters in the "Sensing" palette. They report the mouse's location on the screen.
  4. What do you think this script will do?
    Follow That Mouse Script
  5. Build that script and move your mouse around the stage while the program is running. Does it follow your expectations?
  6. Change the go to block to look like this:
    You can change a script even while it is running.
    Go To Y+30 Script
    How does this change the program's behavior?
  7. What will this script do?
    Talk with Your Partner say (they kept) for (1) secs, forever [say (talking) for (1) secs, say (and) for (1) secs]

No comments:

Post a Comment