Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrEdit
System Clock / System Date

daddyivan
Registered User
Quote
2023-07-29 23:41:52

I would like to know if CopperCube supports a system clock or date? The game I been working on is a Sims like am which also uses a system clock to change the world.

I made different variants of the hub world base on what time the player hops on the game. Christmas, Halloween or summer. If the game read the system clock / date as [Dec 01] then change variable $worldevents$ from 1 to 3. If a variable = 3 then change summer grass to show grass.

Same with the clock, if player boot the game up around 9:00 PM then change variable $time$ to = 9 to change texture skybox and change lighting.

worldevent_1 - summer
worldevent_2 - Halloween
worldevent_3 - Christmas

It would be nice to know if CopperCube could do this because I search the forum and found nothing. If someone has made a System Clock / System Date then let me know.


pmax
Registered User
Quote
2023-07-30 14:46:18

you are in a wrong section old version of Coppercube.
here is a link where you can download a scene on how to manage the 'system clock by modifying it you can also derive days etc..
https://www.dropbox.com/s/mjzth8...


daddyivan
Registered User
Quote
2023-08-19 03:50:54

wrote:
you are in a wrong section old version of Coppercube.
here is a link where you can download a scene on how to manage the 'system clock by modifying it you can also derive days etc..
https://www.dropbox.com/s/mjzth8...



Woah, thanks man. I didn't know where I should had post it but thanks for showing me this! I wish I could do the dates or days but this works. I try a lot of things with Java and didn't think it was possible .


Dieter
Guest
Quote
2023-08-27 09:59:49

If I'm not mistaken, then this should work in JS for all platforms, but certainly for webgl:

gw_currenttime=new Date();
gw_millisecs = gw_currenttime.getTime();
gw_date = gw_currenttime.getDate();


It might be useful for you to calculate the days past between two dates, so you might use:
Julian day == The interval of time in days since noon at Greenwich on 1 January 4713 BC


now = new Date;
alert((now.valueOf()/86400000) + 2440587.5);



Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact