Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Stencyl Essentials
  • Toc
  • feedback
Stencyl Essentials

Stencyl Essentials

By : Sneyd
4.4 (5)
close
Stencyl Essentials

Stencyl Essentials

4.4 (5)
By: Sneyd

Overview of this book

If you are a computer game enthusiast who has always wanted to know what it takes to build a playable game, or maybe you would like to expand your programming knowledge so that you can develop great computer games using a solid game engine and toolkit, then this book is for you.
Table of Contents (14 chapters)
close
13
Index

Rendering text to the screen


Now that we have created the logic that tracks the score based on how many coins the player has collected, it is imperative that we render this information to the HUD so that the player can view their score as they progress through the game. To do this, we will use the font we imported earlier. Follow these steps to draw the score value in the HUD:

  1. In the Player Handler, we must add a When Drawing event. Navigate to Add Event | Basics | When Drawing.

  2. The drawing blocks are now visible under their own category, called Drawing, in the blocks palette. Drag out a draw text at block and snap it into the when drawing event block, as shown in the following screenshot:

  3. For the text field in our draw text at block, click on the small, downward grey arrow to bring up the menu shown in the following screenshot. Navigate to and select Text | Basics | Operations | Text & Text (this is a concatenator, which means that it combines two strings of a text into one):

  4. In the first...

bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete