How do I make a score keeper

Get help using Construct 2

Post » Wed Oct 11, 2017 1:42 pm

Hello, I need help adding a score on top of the screen. I am making an idle game, sort of like cookie clicker, so I will have a very large number displayed on the screen. Is there any way to make numbers appear on you screen without putting them in as sprites one by one?
B
2
Posts: 5
Reputation: 160

Post » Wed Oct 11, 2017 1:47 pm

Sure, use Sprite Font. I recommend this tool for creating your sprite font:
sprite-font-generator-v3_t86546
Check out my awesome game Doptrix
B
17
S
9
G
51
Posts: 849
Reputation: 28,507

Post » Wed Oct 11, 2017 1:49 pm

@dop2000 Thanks!
B
2
Posts: 5
Reputation: 160

Post » Wed Oct 11, 2017 1:57 pm

With the sprite font can you add 1 to something because I want it so when you click something, it adds 1 to the score. Also, can you make the text bigger?
B
2
Posts: 5
Reputation: 160

Post » Wed Oct 11, 2017 2:03 pm

The easiest method is to create a global variable vScore and a Sprite Font object, say ScoreText.
After you change vScore, use this action to update your sprite font text:

ScoreText -> Set Text to vScore
or
ScoreText -> Set Text to "Your score: " & vScore

With Sprite Font you can make your text as big as you want. And if it's not enough, you can further increase it with Scale :)
Check out my awesome game Doptrix
B
17
S
9
G
51
Posts: 849
Reputation: 28,507

Post » Wed Oct 11, 2017 2:26 pm

@dop2000 Thanks again!
B
2
Posts: 5
Reputation: 160


Return to How do I....?

Who is online

Users browsing this forum: tannerdler and 24 guests