How To Make A Score That Goes On The Screen (Construct 3)

3

Tagged

Stats

3,887 visits, 5,493 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 1 Jul, 2021.

Hello! I will teach you how to make a score variable and add it to the layout.

Adding the "Score" Global Variable

The first thing you have to do is open Construct. Then, go to an event sheet.

Right-click the event sheet, and press "Add Global Variable".

Name it "Score". No need to change any other settings, you can if you wanted or need to.

You got the score variable! Now it's time to add it to the layout.

Adding the score variable to the layout

Go back to the main layout, and look at the layers section (by default located at the bottom right of Construct). You should see layer 0 (Or something else, you may have changed the name)

Right-click it, and click "Add layer on top".

When you click it, it immediately gives you a box where you can type a name for the layer. Type "HUD" which stands for Heads-Up Display, a term used for all the on-screen information.

PARALLAX

Still with the HUD layout selected, look at the properties tab. You should see a line that says, "Parallax|%100 x %100". Type in the text box "0x0" because it will make this layer not move. Double-click the layer and click "Add new object". Add the "Text" object.

Add the text

Change some of the properties of the text so that you can see it. Go to an event sheet.

Put in this:

We use the & operator to join things together.

And that's it! Run the project and do whatever you need to do to add something to the score. It should work!

  • 1 Comments

  • Order by
Want to leave a comment? Login or Register an account!