How do I add an hourly rewards system?

Get help using Construct 2

Post » Mon Oct 12, 2015 7:16 am

I'm looking to add a rewards system to my game, where after an hour or so, the player will get a random reward.
So if the player starts the game, plays for 5 mins and closes it, then comes back after an hour, it would register as an hour and 5 mins....not just 5 mins.

I am currently having trouble with setting up a timer to do this, as the timer doesn't tick once the app is closed.

Any suggestions?

Please help. Thanks.
B
4
S
1
G
1
Posts: 33
Reputation: 714

Post » Mon Oct 12, 2015 7:50 am

Store the system time before closing the game, check the time again when you re-start it. Then compare the two.
B
48
S
16
G
9
Posts: 1,097
Reputation: 11,195

Post » Mon Oct 12, 2015 1:44 pm

spongehammer wrote:Store the system time before closing the game, check the time again when you re-start it. Then compare the two.


Could you explain how to store system time please?
Also, what do I compare it with? The current system time? Wouldn't that be specific? Because this event needs to happen every 1 hour.

Can someone please show me how? :(
B
4
S
1
G
1
Posts: 33
Reputation: 714


Return to How do I....?

Who is online

Users browsing this forum: tarek2, yiuyiu6666 and 21 guests