Step 8: Setting the Score

Goal:


This is the final step and we are done with this lesson.

We have a variable to hold our score, and we have a couple different places to change what that score is, but we need to set the score to 0 every time the game starts.

Steps:

  1. From the sprite menu, select the one called X_Wing.
  2. Find the block of code where we set the Speed of our X-Wing.
  3. From Variables, place a set to block right after the set to block for Speed.
  4. Set the variables to Score and the amount to 0.

Code:


Click to replay