O'Reilly logo

App Inventor 2 Essentials by Krishnendu Roy, Felicia Kamriani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating the score label to display the level

In our game, we have a label that displays the score or the words "Game Over". Now that we have implemented levels as well, we also want to display the level within that label.

As shown in the following screenshot, we used the join block to join two pieces of information and display it in the label—the word Score: (there is a blank space after the colon) and the value of the score. Now that we want to display the level, we will add three more pieces of information to this join block. There is another blank space after the score (value), followed by the word "Level: " (there is also a blank space after the colon here), and finally the value of level.

To make room for these three new pieces of information, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required