How do I make one play per day

Just started using Construct 2? Post your questions here

Post » Sat May 14, 2016 7:54 pm

Player should play only once per dey.
How do i make than branch/ condition ?
B
25
S
8
Posts: 215
Reputation: 2,173

Post » Sun May 15, 2016 4:54 am

Set a timer that last 24 hour and the player can play when timer is over
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 15, 2016 10:05 am

@PixelPower Thanks for reply, sounds easy, can you make capx example?
B
25
S
8
Posts: 215
Reputation: 2,173

Post » Sun May 15, 2016 10:08 am

Actually its not that easy, your timer wont run when the game isn't active.

Go ahead and store the current date in localstorage.
Then compare the last stored date with current date.

May need to decide, when the play for the day is over and to update the storage.
B
22
S
7
G
4
Posts: 154
Reputation: 3,709

Post » Mon May 16, 2016 9:23 am

This could also be circumvented by a player changing the date/time on the phone if I understand correctly. So you could either take that chance, or have a server setup to query date & time.
In development: Avalon Isle
B
12
S
4
G
1
Posts: 44
Reputation: 1,496


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 5 guests