Step 1. Go to the VARIABLES category.  Click on Make a variable.  Enter the Variable name as Lives, and keep it on For all sprites.


Step 2. Click on the CONTROL category.  Add when Flag clicked.


Step 3. Click on the VARIABLES category.  Add set Lives to 0.  Change the 0 to 3 (or whatever Lives you want to start with).


Step 4. Click on the CONTROL category.  Add when Flag clicked.


Step 5. Add the Forever if


Step 6. Click on the SENSING category.  Add the first script called touching and put it into the forever if box.  Change the drop-down arrow in touching to Sprite1.


Step 7. Click on the VARIABLES category.  Pull out change Lives by 1 and put it into the forever if.  Change the 1 to -1 (or how many lives you lose when you touch Sprite 1).


Step 8. Click on the LOOKS category.  Pull out say Hello! for 2 secs and put it into the forever if.  Change Hello! to OUCH! and 2 secs to 1 secs.

This creates a DELAY between times you can register losing a life.  Without this, your Lives would go down super fast!

You have completed Collision Detection!  The rest of the game is very similar to create a new sprite that is the food you eat and you gain points.