[Plugin] System date and time

Post your completed addons to share with the community

Post » Thu Aug 28, 2014 3:35 pm

gumshoe2029 wrote:Does your Date plugin always grab the Date() from the System clock? I have been trying to get server time (in a UNIX timestamp format) via an AJAX call, but the clock seems to be displaying my local system time, not the server time that I gave the timestamp in your example.


I am not sure, this is the source code for UNIX timestamp.
Code: Select all
var today = new Date();
UnixTimestamp = today.getTime();
B
97
S
22
G
179
Posts: 4,124
Reputation: 104,555

Post » Thu Aug 28, 2014 3:41 pm

Right, I'll tweak it to not do that. I want it to error off if the AJAX call fails. Thanks for your awesome plugin.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
18
S
5
G
1
Posts: 1,144
Reputation: 4,066

Post » Fri Sep 19, 2014 3:12 am

Rex rox. Thanks for the plugin. \o/
B
29
S
4
Posts: 135
Reputation: 2,131

Post » Thu Oct 09, 2014 6:26 pm

@rexrainbow - thanks so much for all your amazing work. I was noticing the 'time away' plugin doesnt seem to work on mobile if you're just 'pausing' the game by hitting the home button and returning. it only seems to work if you actually **close** the app then return later. Is there some way to get it to work for simply switching away from the app then switching back?

Thanks again! Crazy good stuff.

Nate
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
23
S
7
G
3
Posts: 375
Reputation: 4,797

Post » Fri Oct 10, 2014 4:14 am

80bit wrote:@rexrainbow - thanks so much for all your amazing work. I was noticing the 'time away' plugin doesnt seem to work on mobile if you're just 'pausing' the game by hitting the home button and returning. it only seems to work if you actually **close** the app then return later. Is there some way to get it to work for simply switching away from the app then switching back?

Thanks again! Crazy good stuff.

Nate


Call action start timer every tick or every second then you will not miss any kind of pausing I guess.
B
97
S
22
G
179
Posts: 4,124
Reputation: 104,555

Post » Fri Oct 10, 2014 1:37 pm

@rexrainbow -- yeah i completely forgot there was a browser action called 'On Resume' which i could use too, i haven't tested yet, but im sure if i set it to check for time-away "On Start of Layout" and "On Resume" i should be good :)

thanks so much for all your amazing work!
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
23
S
7
G
3
Posts: 375
Reputation: 4,797

Post » Thu Oct 16, 2014 4:25 pm

what was date.count again?
B
21
S
6
G
5
Posts: 391
Reputation: 5,627

Post » Fri Oct 17, 2014 4:53 am

@krish

expression: date.count will return the number of existed date object, like Sprite.count.
B
97
S
22
G
179
Posts: 4,124
Reputation: 104,555

Post » Mon Oct 27, 2014 6:06 pm

This looks to be a brilliant plugin and the time away is exactly what I'd need for the game I have in mind.

I am, however very new to Construct 2 and I'm having difficulty in figuring out how to get it to work.

Would someone be kind enough to maybe run up a little demo showing what I should be doing?
I'm really after having the time away displayed on screen and maybe even include the On Resume coding too.

I realise its a lot to ask but really, if I can get that piece of code sorted, Im a happy bunny.

I'm thinking of purchasing the personal licence and it'd be the defining point.

Many thanks in advance.

UPDATE: Never mind, guys.... I figured it out. :D
B
7
Posts: 33
Reputation: 341

Post » Sat Nov 01, 2014 8:05 pm

rexrainbow wrote:Document, plugin and sample capx are included.


time away plugin, Get elapsed interval of turned off game from webstroage.

where the link to download in your page?
ImageImageImageImageImage
B
49
S
14
G
5
Posts: 852
Reputation: 11,001

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 3 guests