Tracking the score

Let's set things up so that we can track a score for destroying the goalBall sprites. Add another global variable and name it Score, as shown in the following screenshot:

Tracking the score

Then, add another goalBall action. This time, make it an Add to action that adds to the value of Score. Let's insert 100 in the Value field, as shown in the following screenshot:

Tracking the score

Then, just copy-and-paste this action to all the other goalBall collision events. Now, every time a goalBall sprite is destroyed, your player's score will increase by 100!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.150.123