Home About News Locations Courseware Tidepool Donate Subscribe Contact

Courseware Screencast

back to list next previous
  Lesson 28 - adding variables; book tiles  

back to list next previous

Lesson 28 Tasks

  1. Since siblings share their scripts, use variables to vary their behavior.
  2. Add your own custom variable by clicking the orange down arrow in the viewer.
  3. Use custom variables in the same way you use other variables like x and y.
  4. Drag the variable's name tile to a number in a script to use that variable instead.
  5. The current number in the variable will be used instead of the fixed number.
  6. Siblings have their own copies of variables, so each can be different.
  7. Use the next page tile in the book's viewer to change pages in scripts.
  8. If you cannot get back to a page, use the player list to stop the appropriate script.
  9. Make sure you reset any test condition that turns a page before you turn the page.

Starfish Challenge

Make a sketch that moves, then add a variable called "hits" to it. Add a test
that increases this variable each time the mouse pointer touches it. Show the
variable as a viewer and watch the "hit counter" increase as you touch the sketch.