MicrolearnENPTES

Show the score

Lesson 5 of 16 · GDev.Micro

The Score changes, but the player cannot see it. The text object ScoreText still shows the text it was created with.

An event with no conditions runs on every frame. That makes it the right place for actions that keep the screen in step with your variables, such as updating a score label.

Putting the same action under At the beginning of the scene would run it only once and show 0 forever. Try it and compare.

In GDevelop you build that text with an expression: "Score: " + ToString(Score). The action here does the same.

Keep ScoreText updated so the player always sees the current Score.

Do it in the browser: a real game design tool, a short mission and instant feedback. No install.

Start this lesson — free
← Collect the coinsTrigger once →

All lessons · GDev.Micro