-
Hi!
inspired of some dynamic-weather topics in the past months,
i'm trying to write my own dynamic weather script for MP missions. Here it is:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
changetime=0
#start
~changetime+30
;servercode
?!(local server) : goto "wait"
changetime=1200+(random 1200)
weather=random 1
?(weather >= .52) : goto "foghigh"
?(weather < .52) : goto "foglow"
#foghigh
fog=.44+(random .41)
goto "continue"
#foglow
fog=.075+(random .25)
goto "continue"
#continue
;here the problem starts...
publicVariable "changetime"
publicVariable "weather"
publicVariable "fog"
#wait
;code executed on all machines...
@(changetime != 0)
~1
changetime setOvercast weather
changetime setFog fog
goto "start"
#end
exit
[/QUOTE]
and now my problem: when the three variables (changetime, weather and fog) shall be declared as public variables, i get
the "unknown operator"-message. Does anybody know why?
Thank you all very much for your help!
-
I just ran your script and didn't get any errors? You might want to do this though:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
#start
changetime=0
[/QUOTE]
RED
-
-
It is fine
If you are interested, the ECP has a random weather script included that can be altered to suit mission editors needs. The ECP can be found here.
Good luck with your mission marcusm.
RED
-
...sounds interesting, i'll have a look at ECP. 
Thank you again for your time!***
Greetings !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules