World and Level Scores Calculated Seperately

Get help using Construct 2

Post » Mon Jun 15, 2015 9:24 pm

I am looking for recommendations on how others would recommend doing this.

I have a game that is basically Worlds with Levels and Questions within the Level. You get scores within the Levels by answering Questions and the World score is a sum of the Levels within the given World.

I tried using WebStorage, via example download, but it doesnt seem to doing what I want.

Here is how I am trying to get the scoring to work:
    Player is in World1, Level1, Question1 and gets a 10 points
    Apply 10 to CurrentWorld, CurrentLevel, CurrentQuestion (result World1, Level1, Question1 = 10)
    Apply +10 to CurrentWorld, CurrentLevel (result World1, Level1 = 10)
    Apply +10 to CurrentWorld (result World1 = 10)
    Player is in Question2, same World/Level, and gets a 10 points
    Apply 10 to CurrentWorld, CurrentLevel, CurrentQuestion (result World1, Level1, Question2 = 10)
    Apply +10 to CurrentWorld, CurrentLevel (result World1, Level1 = 20)
    Apply +10 to CurrentWorld (result World1 = 20)
    Player skips to Question5, same World/Level, and gets a 15 points
    Apply 15 to CurrentWorld, CurrentLevel, CurrentQuestion (result World1, Level1, Question5 = 15)
    Apply +15 to CurrentWorld, CurrentLevel (result World1, Level1 = 35)
    Apply +15 to CurrentWorld (result World1 = 35)
    Player goes to Level2, Question1 and gets a 20 points
    Apply 20 to CurrentWorld, CurrentLevel, CurrentQuestion (result World1, Level2, Question1 = 20)
    Apply +20 to CurrentWorld, CurrentLevel (result World1, Level2 = 20)
    Apply +20 to CurrentWorld (result World1 = 55)

End result
World1 = 55 (sum of all levels within world)
Level1 = 35 (sum of all questions within level)
- Level1 - Question1 = 10
- Level1 - Question2 = 10
- Level1 - Question5 = 15
Level2 = 20 (sum of all questions within level)
- Level2 - Question1 = 20

And so on...

I then want to report on the scores for each section individually.

What is the best way to do this?
Last edited by gmgllc on Wed Jun 17, 2015 1:45 pm, edited 1 time in total.
B
7
S
3
Posts: 30
Reputation: 687

Post » Tue Jun 16, 2015 11:57 am

I am guessing LocalStorage but would I use three or is it possible to use one?
B
7
S
3
Posts: 30
Reputation: 687

Post » Wed Jun 17, 2015 2:35 pm

It is too bad there isnt a way to just sum the scores using an array or something.

Here is basically what I was thinking the table would look like if I could store everything based on question score:
Image

Then if it were possible to use SQL type queries do a SUM([Question Score]) AS score WHERE World = '1' and similarly for Level.

But I think it will look more like this in reality:
Image

I would really appreciate some input on how others would recommend doing this.
B
7
S
3
Posts: 30
Reputation: 687

Post » Thu Jun 18, 2015 1:20 pm

I guess maybe this is either a super simple problem and I am just overlooking the solution, it is a problem no one else has, or it is really difficult... Hopefully its not the first. :)

Is an Array, or multiple, the solution?
B
7
S
3
Posts: 30
Reputation: 687

Post » Fri Jun 19, 2015 2:14 pm

echo... echo... ko... ko.. o.. ..
B
7
S
3
Posts: 30
Reputation: 687

Post » Fri Jun 19, 2015 2:36 pm

Thats not real a problem.
I think you only need to think beyond the toturials.

And maybe browse the custom plugins.
Sorry for my bad english, but I really do my best! And use and check with Google Translator.
B
10
S
4
G
1
Posts: 158
Reputation: 1,303

Post » Fri Jun 19, 2015 2:55 pm

I believe it can be done but "How do I" or is an approach someone would recommend?
B
7
S
3
Posts: 30
Reputation: 687

Post » Tue Jun 23, 2015 5:17 pm

I think I am part way there now but not sure what I am doing wrong.

The score doesnt seem to want to save in relation to the World.Level.Question.

I purchased the example from AndreasR but in going through the code I think it is overkill for what I am trying to do.

I am willing to pay someone to work this out with me.

Here is my capx: http://gruvisoft.com/games/C2-HelpMe/World.Level.Question.Test.01.capx
B
7
S
3
Posts: 30
Reputation: 687

Post » Tue Jun 30, 2015 1:39 pm

What I ended up doing was creating an array for each level and then doing simple addition for each row in the level to calculate the score for the world.
B
7
S
3
Posts: 30
Reputation: 687


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests