Variable for overall score

Get help using Construct 2

Post » Thu Oct 04, 2012 11:44 am

I'm a bit confused how to do this without a million lines of code

In my game there's say 100 levels and on each level there are like x number of things to be destroyed

Say on level 1 there's 26 items and on level 2 there's 15

on level 1 you destroy 10 and move on to the next level, on level 2 you destroy 3 items

You can submit your score after any level

I need the variable (which will be stored in local storage I guess) to be the accumulation of these numbers i.e. 13 after completing level 2

If they go back and do level 1 and manage to destroy 15 items there overall score is now 18

What's the best way to store and update this kind of score variable?

Thank you
B
11
S
2
G
3
Posts: 95
Reputation: 3,028

Post » Thu Oct 04, 2012 7:18 pm

Here is a very heavily commented capx to hopefully get you started.

http://dl.dropbox.com/u/93047429/scoresToGetYouStarted.capx

Hope it helps!Yswellin2012-10-04 19:18:11
B
16
S
3
G
3
Posts: 66
Reputation: 3,629

Post » Fri Oct 05, 2012 11:34 am

Thank you very much
B
11
S
2
G
3
Posts: 95
Reputation: 3,028


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests