Local Storage How can I save money earned in game

Get help using Construct 2

Post » Sun May 08, 2016 12:44 pm

Ok honestly I didn't think I would have this problem since I figured out how to save highscores. But alas its not the same!! I been going crazy for a day now , even followed the tutorial on local storage and it didn't work.

Player shoots enemies and money goes up. All I want to do is save the money so when you die and come back the money you earn last session is still there . Then when you play you can earn more money and save up.

Image
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,615

Post » Sun May 08, 2016 1:44 pm

Here is my 2nd try its exactly like the tutorial and doesnt work.

Image
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,615

Post » Sun May 08, 2016 2:32 pm

After hours of experiments I found a solution but I don't really like it and hope there is a better method in the future. I added an event to my shooting method which updates the key and set it to the variable. To me this feels like sloppy code but it works for now. There must be a more streamline method.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,615


Return to How do I....?

Who is online

Users browsing this forum: Jackriduk, kiki4construct, osek95 and 22 guests