How do I have an object that has an increasing variable?

Get help using Construct 2

Post » Wed Apr 16, 2014 10:07 pm

I want a simple increasing variable which would be easy, but I want it to keep increasing even after the game is closed. For example a tree has 2 apples and after the game is closed and one day has passed the game is continued and the tree has 3 apples.

This is very difficult and I have no clue so I'm helpless.

Thank you an good day. :?
B
15
S
5
Posts: 18
Reputation: 1,131

Post » Wed Apr 16, 2014 10:16 pm

Maybe you could save on Webstorage the date (using Javascript, I guess?) when you closed the game. When you open it, load the Webstorage key value and check again the date. Compare and do whatever you want.

Check this plugin:
plugin-system-date-and-time_t63492?&hilit=date
B
53
S
12
G
7
Posts: 133
Reputation: 9,380

Post » Thu Apr 17, 2014 10:13 am

Thanks!
B
15
S
5
Posts: 18
Reputation: 1,131


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, newt and 5 guests

cron