How do I store the score value?

Get help using Construct 2

Post » Sat Jul 26, 2014 7:29 pm

ahhhhhh thats it, i want to store the value so i can display it on the "game over" screen (layout), like: "your score is: __"
if u have any tips or perhaps other way to make this happen pls post them
-thanks
B
4
S
1
Posts: 54
Reputation: 456

Post » Sat Jul 26, 2014 10:31 pm

Go to the layout view, double click on the screen and create a new Text, call it "Text_Score" for example.

Then go to the event sheet and do a right click, select add new global variable. Call it "Score" for example, select type Number and initial value is 0.

Right click again, select add new event. In the appearing popup window, select System -> Every tick. The event appears in the event layout. Next to it, there's add action. Click on it, select Text_Score, then select set Text. In the appearing small popup window enter the following:

"Your score is: " &Score
B
13
S
2
Posts: 21
Reputation: 721


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests