Jump to content
Sign in to follow this  
{USI}_Zombie

Weather and locality

Recommended Posts

I can't seem to get the weather synch'ed, I suspect a locality issue. Does anyone see an issue?

;;RandomWeather.sqs
;;SetFog Info
;;transitionTime SetFog fogValue 
;;fogValue indicates the fog amount. Value can be between 0.0 and 1.0 where 0.0 is clear skys and 1.0 is complete fog.
;;transitionTime is the amount of time (in seconds) for the transition to the new weather takes. 

;;SetOverCast info
;;transitionTime SetOvercast overcastValue 
;;transitionTime is the amount of time (in seconds) for the transition to the new weather takes. 
;;overCastValue indicates the weather. Value can be between 0.0 and 1.0 where 0.0 is clear skys and 1.0 is complete ;;overcast.

#init
_wait=1800

#Start
~1
?(Local Server):WeatherNumber=Random 6
?(Local Server):WeatherNumber=(WeatherNumber+.05)-((WeatherNumber+.05) mod 1)
PublicVariable "WeatherNumber"
;;debug code next 2 lines
;;_msg=Format["%1",WeatherNumber]
;;titletext[_msg,"PLAIN"]

?(WeatherNumber==0):Goto "ScatteredClouds"
?(WeatherNumber==1):Goto "LightFog"
?(WeatherNumber==2):Goto "HeavyOvercast"
?(WeatherNumber==3):Goto "HeavyFog"
?(WeatherNumber==4):Goto "HeavyRain"
?(WeatherNumber==5):Goto "ClearandSunny"
?(WeatherNumber==6):Goto "LightRain"

#ScatteredClouds
5 SetOvercast .5
Hint "The forecast is for scattered clouds."
~_wait
Goto "start"

#LightFog
5 SetFog .5
Hint "The forecast is for light fog."
~_wait
Goto "start"

#HeavyOvercast
5 SetOvercast 1
Hint "The forecast is for heavy overcast."
~_wait
Goto "start"

#HeavyFog
5 Setfog 1
Hint "The forecast is for heavy fog."
~_wait
Goto "start"

#HeavyRain
5 SetOvercast 1
5 Setrain 1
Hint "The forecast is for heavy rain."
~_wait
Goto "start"

#ClearnandSunny
0 SetOvercast 0
Hint "The forecast is for sunny skies."
~_wait
Goto "start"

#LightRain
5 Setrain .5
Hint "The forecast is for light rain."
~_wait
Goto "start"

Share this post


Link to post
Share on other sites

Umm - shouldn't that publicvariable command have a ?(local server) in front of it ? Otherwise all clients (and server) are simultaneously broadcasting and the server value is probably getting overridden with garbage.

BTW - be warned... http://dev-heaven.net/issues/show/5060

Share this post


Link to post
Share on other sites
Umm - shouldn't that publicvariable command have a ?(local server) in front of it ? Otherwise all clients (and server) are simultaneously broadcasting and the server value is probably getting overridden with garbage.

BTW - be warned... http://dev-heaven.net/issues/show/5060

will give that a try......

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×