🍎 Step 6: Feed Your Pet Game

🌟 What's New?

Let's make a game where you feed your pet to get a high score! We will use a Variable to keep track of your points.

🛠️ What to Do

  1. Make a Score:
  2. Go to the Variables toolbox and click Make a Variable. Name it Score.
  3. Set the Score to Zero:
  4. Grab the set score to 0 block and put it in your on start block.
  5. Gain Points:
  6. Whenever you feed your pet (like pressing Button B), let's get a point!
  7. Grab the change score by 1 block and put it in your on button B pressed block.
  8. Show Your Score:
  9. Grab the show number block from the Basic toolbox.
  10. Put your Score variable block inside it. Put this at the end of your feed button code!

Leave a screenshot of your feeding game code here: Insert Feeding Game Code Here

🏆 Challenge!

  • Make it so you lose a point if you shake the pet while it's eating!
  • Can you add a winning sound if your score reaches 10?