Hardware Reference
In-Depth Information
FIGURE 3-15 Creating a variable
3. You'll see some orange blocks added to your Variables palette, and a small coun-
ter box appears on the stage (see Figure 3-18).
4. Add the block Set Health to 0 to the starting point script you have already
created. You can then change the value of Health from 0 to 50. his means at
the start of the game when the green flag is clicked, the Adventurer sprite will
start with 50 health points. Figure 3-16 shows the script up to this point.
5. Remember to save the work you have done so far by clicking File Save. hen
test that your scripts work by clicking the green flag icon.
FIGURE 3-16 he Adventurer sprite start script so far
Search WWH ::




Custom Search