How do I create a real time countdown like Clash of Clans

Get help using Construct 2

Post » Wed Mar 04, 2015 7:32 pm

Heyho people!

Im working on a mobile game, and like clash of clans and other games, i want to create an object which takes some minutes to be build in real time. (regardless of the game is playing or not!)

For example: start building 17.00, show and play countdown with 30min, bulding complete 17.30

It's possible to build this with use of webstorage and the timeclock from the device?

Thanks
B
10
S
3
Posts: 6
Reputation: 737

Post » Mon Mar 23, 2015 11:15 am

Anyone?
B
4
Posts: 3
Reputation: 206

Post » Mon Jun 01, 2015 2:57 pm

a game like clash of clans will want a server so you can use a server to trak time and other stuf
you can use multiplayer plugin and you must make a server game and a client game
B
16
S
6
Posts: 243
Reputation: 1,755

Post » Mon Jun 01, 2015 3:15 pm

You could use system.wallclocktime for this It will keep counting even if the game is suspended.

Another option would be to use the third party system date time - plugin from the plugin section of this forum..
( this would still work if you close and re-open the game)

You will need to use local storage to save stuff to be able to compare correctly..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
53
S
16
G
8
Posts: 6,157
Reputation: 19,744

Post » Tue Jun 02, 2015 5:02 am

for example set time to 100 and every second subtract one from 100
B
46
S
14
G
10
Posts: 198
Reputation: 7,926

Post » Tue Jun 02, 2015 7:52 am

for real time I would probably just

every tick ----> set value (MaxTimerLimit - dt)

takes away the amount of time that passes real time during play
B
26
S
6
G
2
Posts: 221
Reputation: 2,796


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests