6. Add a Counter

1. Importing a new Counter 

Select the Edit tab then 'Import class...' and choose Counter.

 

Then right-click, choose the New Counter() option and drag it into the world.

You must right-click on the background and select 'Save the World' once you have dragged the counter into the world.

Increasing the counter requires just one line of code.

Add it within the IsTouching code of your main character (when it eats the collectible object).

© CSNewbs 2020