Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 03-19-2001, 01:29 AM
JoMomma JoMomma is offline
Registered User
Join Date: Mar 2001
Posts: 43
JoMomma is on a distinguished road
Exclamation Re: Server strings:

Quote:
Originally posted by grim_squeaker_x
Any string set with the setstring command which begins with "server." When it is changed it changes for all the players on the server. So it is possible to use it for night/day or weather or CTF Games or whatever.
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.
__________________
Temporary disabled
Stefan Knorr
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:34 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.