|
Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
|
10-12-2005 20:35
Guys, I need to build a 48 hour count down script that will say the hours, min and sec left. the 48 hours is based on real life time not game time.
Do you have any recommendations on the best way to do this? I though of using the timer and jsut reducing hte numbe rof second each time the timer is fired. Is there a better way and how exact is the timer?
Seer
|
|
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
|
10-13-2005 05:03
The timer isn't 100%, but it's not bad. You could do something like trigger it every hour to check against the Wallclock and reset as needed that way as long as your punters won't complain about odd slips and updates (shouldn't actually see big ones but I've not tried it either). There's no obvious way to read the wallclock directly without a timer or similar, so you're limited that way, although you could call the wallclock every time instead if you'd rather.
|
|
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
|
10-13-2005 07:08
or use llGetGMTclock, which is not affected by daylight savings time switchovers. Also - what is the context here? If it is for some sort of deadline or soething like that? Bear in mind that for many applications, seconds (and sometimes minutes) are quite irrelevant when there are still 40 hours to go. So you cound start with a timer that only fires every 10 minutes, for example. In the timer event you read the GMT time and update the hover text. Then if there is less than an hour to go, you change the timer to every minute. And every second for the last minute. Of course, if it were something like a rental clock - you could probably get rid of the timer and the text, and just llSay the remaining time when someone touches the object.
|
|
Seer Xingjian
Registered User
Join date: 29 Sep 2005
Posts: 35
|
10-13-2005 15:24
guys, Thanks for hte replies. Int he end i just went with the timer removing seconds. It seem to keep the time well enough i just hope it holds over 48 hours. basically i needed it to connect to a sign for an event and have it cound down from 48 hours. i really wanted the minutes and second in it although they were manily for looks. I have only tested it for 10 min so far but i am on a low lag sim so i am hoping it will hold for 48 hours if not i guess the event will go a little longer than planned 
|