How do I make score improve when the app is not running.

Get help using Construct 2

Post » Fri May 16, 2014 10:36 am

Hi everyone,

I have a 'bank' in my app. The user puts some of their score in the bank and I'm hoping to make it increase while it is in there.

I was wondering how I can make the users score (when in the bank) increase over time? As if they are generating interest.

Most importantly I would like it to work even when the app is closed. Is this even possible?

Anyone got any ideas?

Thanks!
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Fri May 16, 2014 11:00 am

I think you would have to gather the difference in time between plays. Something like save the current time/date and the next time the user open the app compare the current time to it. Then convert it to seconds and do the calculations on how much their score should have improved in that amount of time. This of course lets the user cheat if they change the time on their device.
B
10
S
2
Posts: 30
Reputation: 722

Post » Fri May 16, 2014 11:15 am

Firewires wrote:I think you would have to gather the difference in time between plays. Something like save the current time/date and the next time the user open the app compare the current time to it. Then convert it to seconds and do the calculations on how much their score should have improved in that amount of time. This of course lets the user cheat if they change the time on their device.


Hi Firewires,

that actually sounds like a pretty plausible way of doing it thanks!

I'm still a bit of a novice when it comes to Construct though - could you advise me as to how I can a) save the time/date specifically (instead of the whole game) b) compare the two times? I've read the manual cover to cover a while ago but I can't remember anything in there that would help me with this!

Oh just one other little note - the game is mobile based.

Thanks for your help!
B
13
S
6
Posts: 130
Reputation: 1,553

Post » Sat May 17, 2014 1:23 am

I see 2 plugins that might help you in the Completed Plugins section of the forum:

[Plugin] System date and time
viewtopic.php?t=63492&start=0

[PLUGIN] Date to string
viewtopic.php?t=83279&start=0

If you need help installing the plugins refer to this:
how-to-install-plugins-and-behaviors_t63985


Hope this helps you.
B
10
S
2
Posts: 30
Reputation: 722


Return to How do I....?

Who is online

Users browsing this forum: Fradno and 15 guests