How do I update/change values in webstorage

Get help using Construct 2

Post » Tue Dec 09, 2014 10:17 pm

Hello,
I have recently started making a game using construct2 but i found a big problem i can't manage to fix.
I have global variable "Deaths" and Webstorage that stores the value for it.
When the player dies (gets destroyed) Deaths get increased by 1 and Webstorage gets updated.

My problem is that after first death the value doesnt want to get updated in any way and i cant seem to find the cause of problem :(
B
3
Posts: 3
Reputation: 181

Post » Tue Dec 09, 2014 10:47 pm

,,,,,,,,,,,,,,,,,,,,,,,
You do not have the required permissions to view the files attached to this post.
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Tue Dec 09, 2014 11:04 pm

I see what you did in that but unfortunately that doesn't solve my problem.

So when i die for the first time, the value gets updated just fine but if i die again the value stays the same ;/

Here are all the screens that use the WebStorage:
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 3
Reputation: 181

Post » Tue Dec 09, 2014 11:20 pm

on Start of layout set Variable to WebStorage
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Wed Dec 10, 2014 9:09 am

I added that function but the problem is still the same :<
First deaths adds 1 to deaths but another deaths doesnt do anything and the counter stays at the same value



I would attach a capx file but unfortunately i can't post links and the file is too big to use the attachment option :(

This is the part responsible for loading the game (when player dies you have to press R to restart/load the game):
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 3
Reputation: 181


Return to How do I....?

Who is online

Users browsing this forum: Cubeeo and 24 guests