How do I keep lifetime collected score? capx included.

Get help using Construct 2

Post » Tue Nov 04, 2014 5:59 am

How do I keep lifetime collected score?
i have high score set up but i also need a lifetime collected score not high score.
i want to pool every coin/click collected and add it together.

https://www.dropbox.com/s/ulcicj1mt5e2r ... .capx?dl=0
Last edited by etaprime on Tue Nov 04, 2014 4:31 pm, edited 1 time in total.
B
8
S
2
Posts: 54
Reputation: 1,001

Post » Tue Nov 04, 2014 6:59 am

I am assuming that in your capx, the menu comes before the stage.
When you go back from the stage to the main menu, the lifetimeScore variable gets overwritten by the current highscore, also everytime stage is launched, lifetimescore is initialized to zero.
One way to solve this is to create the lifetimescore variable in a different event sheet and include this event sheet on stage and menu.
B
28
S
10
G
10
Posts: 97
Reputation: 6,584

Post » Tue Nov 04, 2014 4:32 pm

i tried that but the same thing happens.
i need a way to "add to" local value.

https://www.dropbox.com/s/ulcicj1mt5e2r ... .capx?dl=0
B
8
S
2
Posts: 54
Reputation: 1,001

Post » Tue Nov 04, 2014 5:10 pm

.....
You do not have the required permissions to view the files attached to this post.
Image
B
65
S
23
G
7
Posts: 1,505
Reputation: 10,896

Post » Tue Nov 04, 2014 5:16 pm

THANK YOU< THANK YOU
B
8
S
2
Posts: 54
Reputation: 1,001

Post » Sun Apr 26, 2015 8:31 pm

sorry guys, can you post a capx with a localstorage for score and highscore ??? would be so helpful...thanks
B
37
S
16
G
2
Posts: 447
Reputation: 4,865


Return to How do I....?

Who is online

Users browsing this forum: Apollo14, ChoosyZerk and 57 guests