Step 4: Medium Target Hit Message/Score/Reset

Goal:


The code for the Medium Target is very similar to the Easy Target code except for two small differences.

The first difference is that the number of points received is higher than before because the Medium Target is harder to hit than the Easy Target

The second difference is that the position of the Medium Target is different from the Easy Target which means we need to change the X and Y values in our code.

Steps:

    1. Click on the “Medium Target” sprite
    2. From Events, place a when I receive block and add a new message called “MediumScored!
    3. From Looks, place a hide block
    4. From Variables, place a change Score: by 3 block
    5. From Motion, place a go to X: 220 Y: -180 block
    6. From Control, place a repeat block
    7. From Operators, place a pick random 25 to 75 block and place it inside the repeat block
    8. From Motion place a change x by 5 block
    9. From Motion place a set y to 60 block and place it outside the repeat block
    10. From Looks, place a show block.

Code: