final score

Get help using Construct 2

Post » Tue Mar 18, 2014 8:05 pm

i have 3 layouts each with their own event sheet, the layouts are: main menu, game, game over.

i have my score counter on the game layout and event sheet, and would like that score to show on the game over screen to show the players final score. is this possible?

thanks
B
4
S
1
Posts: 46
Reputation: 542

Post » Tue Mar 18, 2014 10:36 pm

Save your score as a global var, you can access them form every layout of the game.
Image
B
82
S
30
G
12
Posts: 517
Reputation: 12,763

Post » Wed Mar 19, 2014 3:06 am

Yes global var or WebStorage
B
17
S
7
Posts: 360
Reputation: 2,202

Post » Wed Mar 19, 2014 9:48 am

i have it already set to global variable but for some reasoni just cant figure out how to get it to show on the final layout
B
4
S
1
Posts: 46
Reputation: 542

Post » Wed Mar 19, 2014 9:54 am

Put a Textobject on the final layout, read the content of the global variable and paste it into the textobject.
B
44
S
10
G
8
Posts: 437
Reputation: 6,473

Post » Wed Mar 19, 2014 10:17 am

hi ubivis im not quiet sure what you mean by copy the content of the variable?
B
4
S
1
Posts: 46
Reputation: 542

Post » Wed Mar 19, 2014 10:20 am

Event : On Load Layout ( for exemple you can take a lot i think ) --> Action : Text ( Name Of your Target Text Object ) Set Text to ( Your Global Variable Name ).
B
21
S
9
G
3
Posts: 70
Reputation: 2,722

Post » Wed Mar 19, 2014 10:40 am

ok i did that but now it shows the score as its starting value of 0 instead the final score
B
4
S
1
Posts: 46
Reputation: 542

Post » Wed Mar 19, 2014 10:41 am

can you do a snapshot of the event you set up? Or maybe upload a capx file? This is much easier for all of us to see where you might have done a mistake.
B
44
S
10
G
8
Posts: 437
Reputation: 6,473

Post » Wed Mar 19, 2014 10:45 am

hmm, i have created a empty text object called text3 on the final layout.

on the event sheet of the final layout i have: system>on start of layout>text3>set text to score variable
B
4
S
1
Posts: 46
Reputation: 542

Next

Return to How do I....?

Who is online

Users browsing this forum: blackhornet and 4 guests