Step 3: Adding Scoring

 Goal:


Awesome, now that we have our main setup for the game done, let’s add a few more things that the game manager needs to keep track of.

The next thing we’ll do is the ability to score.

Now this is going to be a little weird because what we’re doing is adding the ability to detect a score, but we actually won’t be able to score yet. Don’t worry we’ll fix that in the next lesson.

Be sure you are still coding on the backdrop/stage as all this code will also go here.

Steps:

  1. From Events place a when I receive block.
  2. On this when I receive block, select new message.
  3. Name this new message “BalloonPopped!” we’ll see this message come up again in the next lesson.
  4. From Variables place a change by block.
  5. Set the variable to “Score:” and the number value to 1.

Code: