I was wondering if it's possible to run a construct 2 build on a server where the system clock can be synced to the game clock.

To illustrate, let's say the construct 2 build has a day night cycle synced to real time, so anyone who visits the server and plays the game will notice that the game is taking on the servers clock to set the day/night phase.

This will output the unix timestamp. You can then convert the timestamp using "date()" (Refer to this for how to do it: (php.net/manual/en/function.date.php)

Then request the file via AJAX. Using AJAX.LastData gives you the output of the php file. Then you just have to compare the result to whatever you consider day or nighttime. Don´t forget there are timezones and it´s not everywhere day or night not sure if that matters for you though.

I've split the event sheets so that a request is made before going to the new layout, and I removed the every 5 seconds update. Add an Ajax - On Completed event but still comes out to daynightOutput = NaN