How do I save an Array using the new Local storage plugin?

Get help using Construct 2

Post » Sat Jun 06, 2015 6:12 pm

Hi there, i was using until recently a previous version of Construct 2, i had a table of highscores that saved the values into an array (width of 5) and then the list was stored into Webstorage.

Sooo, when i upgraded Construct 2, my highscores section stopped working, because Webstorage plugin lost importance for the new Local storage plugin.

My question is, does anybody knows how to save an array using local storage?
B
4
Posts: 4
Reputation: 208


Post » Sat Jun 06, 2015 8:42 pm

Yes i have seen that tutorial of highscores, the problem is that the values of the table just store for one session, when you close and play again the table has no values, and everything starts from zero again. Using the webstorage the values of the highscore table remained no matter if i closed the game and start playing again...

So i don't know if with the local storage plugin, the values store, can last for more than one session? And how can i accomplish that?
B
4
Posts: 4
Reputation: 208

Post » Sat Jun 06, 2015 8:56 pm

...maybe this "pig" can help you... :D

capx> http://s000.tinyupload.com/index.php?fi ... 4807021486
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sat Jun 06, 2015 10:41 pm

I prefer a "cat",
but "pig" is okay too since it really helping ;)
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » Thu Jul 02, 2015 9:56 am

@limepeek hey I am facing the same problem as you, my local storage values keeps resetting to 0 have you solved it yet?
https://itunes.apple.com/us/app/id1004254105

We bet anyone a hundred dollars if they can reach the bone on the other side of the screen! (Only on the Impossible Mode)
B
10
S
2
Posts: 122
Reputation: 1,004

Post » Thu Jul 02, 2015 4:06 pm

Have a look at my Asteroids code http://myconstruct2dev.blogspot.co.uk/2 ... roids.html which has source code in github and explains how it works - and this one does work. You have probably got your sequence wrong.
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Mon Aug 17, 2015 3:32 pm

Hi, i have solved the problem, but i don't know how, what i did was simply open a previous version of my project to see if it worked, and it did, i think maybe my last project file got corrupted due to the upgrade of Construct 2, i really don't have an answer.

By the way if anyone of you guys want to do the array storage here is the tutorial i followed, it's a bit long, but it's totally worth it, as i can't post the url of the video, just look up in youtube for the channel ArcadEdGames and there must be a video with the title Construct 2 Tutorial - Top 10 High Score
B
4
Posts: 4
Reputation: 208


Return to How do I....?

Who is online

Users browsing this forum: Karpakis and 10 guests