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
9
S
2
Posts: 6
Reputation: 562

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
14
S
6
Posts: 232
Reputation: 1,675

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
41
S
11
G
9
Posts: 194
Reputation: 6,871

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
25
S
6
G
2
Posts: 214
Reputation: 2,715


Return to How do I....?

Who is online

Users browsing this forum: hyem and 24 guests