Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

2. Hello World! Construct Style > Time for action — showing our player their he...

Time for action — showing our player their health and score

We are now going to make two textboxes: one is to tell the player the score, and the other is to tell the player how many lives the character they are controlling has left. We'll also learn how to keep these textboxes on the screen with the player.

  1. First, we will need to add a new layer to the layout. To do this, open the Layers tab on the right-hand menu, and click on the upward pointing paper button to make a new top layer.
    Time for action — showing our player their health and score
  2. Layers can be modified similar to objects. Open the left menu and rename the text layer to HUD (Heads Up Display), and the other layer to Game.
    Time for action — showing our player their health and score
  3. In the layer properties for HUD, change the Scroll X Rate and Scroll Y Rate percentages to 0. This keeps all objects on the HUD layer in the same position on the screen while the game is running.
    Time for action — showing our player their health and score

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial