View Single Post
  #8  
Old 03-19-2001, 06:19 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Re: Re: Server strings:

Quote:
Originally posted by JoMomma


Actually there's a better way to do night/day now: timevar

timevar is a built-in variable incremented every 5 seconds by the server by 1 tick. On the Graal 2001 server, this gets calculated to 2 Graalian minutes... by my calculations this becomes:

30 ticks = 1 hour
720 ticks = 1 day
17280 ticks = 1 month
414720 ticks = 1 year

Oh btw, be careful about division. When it gets to 1 month, you would be doing something like:
int(17279/17280) which gets calculated to 1, since of floating point errors. And 17279 % 17280 becomes. -1. Yep, a remainder less than 0.
Yes I knew that, I'm just saying it for the people who must use the other stuff, like people working on non-pay servers or whatever.

I've already made a working night/day using an offline timevar simulation
__________________

Reply With Quote