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