[URGENT]How can I make this work?

Get help using Construct 2

Post » Mon Nov 23, 2015 4:32 pm

Hello everyone.

I have been trying to get my head around this for weeks now and I have not gotten anywhere with anything at all. I am trying to store some data from the game so that when a player touches "Load Game" it'll load all the values in the variables of the individual scores (in the image below - if it works).

Here's a small cap of it all.. At the end of each layout (Level) the player completes, his/her score is added to the overall score count on the Selection menu. This is all good as it saves it for them and they can come back to it. However, as many of you may know is the fact that the "Save" option in the "System" command saves everything.. the whole state the game is in currently. This is all good and nice, but it's not good and nice if you want to update the game.

So, my question is, how do I get the variables saved individually and not as a whole mess of data and MB's that aren't needed. Let's say, I want to save the Score and the Score only. What do I have to do to make that work?

I'm sorry if I have confused anyone in this post, but I wanted to give as much information as I possible could.

Image 1 => [SHOULD] Saves the values from the end of each level.
Image 2 => [SHOULD] Loads the values from each level back into the game.

Image
Image
B
14
S
1
Posts: 65
Reputation: 732

Post » Mon Nov 23, 2015 5:11 pm

You can use LocalStorage to save your dictionary AsJSON, then load it back again via your button.
ImageImageImage
B
71
S
21
G
233
Posts: 3,697
Reputation: 130,370

Post » Mon Nov 23, 2015 5:15 pm

blackhornet wrote:You can use LocalStorage to save your dictionary AsJSON, then load it back again via your button.


How exactly do I do that?
B
14
S
1
Posts: 65
Reputation: 732

Post » Mon Nov 23, 2015 5:47 pm

ImageImageImage
B
71
S
21
G
233
Posts: 3,697
Reputation: 130,370

Post » Mon Nov 23, 2015 6:20 pm

It doesn't seem to be working for me at all. I did all you did in that .capx file but it still wont do it.
B
14
S
1
Posts: 65
Reputation: 732

Post » Mon Nov 23, 2015 6:24 pm

I can't help without seeing what you've done.
ImageImageImage
B
71
S
21
G
233
Posts: 3,697
Reputation: 130,370

Post » Mon Nov 23, 2015 6:28 pm

Here's what I've done...

This is at the end of a level:
Image

And this is on the Selection window:
Image
B
14
S
1
Posts: 65
Reputation: 732

Post » Mon Nov 23, 2015 6:35 pm

Time to add some debug logging to see what is and isn't running.
ImageImageImage
B
71
S
21
G
233
Posts: 3,697
Reputation: 130,370

Post » Mon Nov 23, 2015 6:51 pm

blackhornet wrote:Time to add some debug logging to see what is and isn't running.


And how exactly do I then find out what isn't working? lol
B
14
S
1
Posts: 65
Reputation: 732

Post » Mon Nov 23, 2015 6:56 pm

Browser.Log lets you log to the debug console (F12 in most browsers). You can add messages anywhere you need to see what is going on.
ImageImageImage
B
71
S
21
G
233
Posts: 3,697
Reputation: 130,370

Next

Return to How do I....?

Who is online

Users browsing this forum: ChesVCF and 18 guests