OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: KoniaX on 21 Jul 2004, 20:04:46
-
Me again. I was wondering how I could change the weather and the time with scripting. I know its possible, but I just don't know the commands. For the time isn't it something like "skiptime 30"? Any suggestions?
-
I'm in a hurry for some MP but..
skipTime duration
Operand types:
duration: Number
Type of returned value:
Nothing
Description:
Skip time. Daytime is adjusted, weather change is estimated, no changes in any units are done. Duration is in hours.
Example:
skipTime 2.5
time setRain rainDensity
Operand types:
time: Number
rainDensity: Number
Compatibility:
Version 1.75 required.
Type of returned value:
Nothing
Description:
Set rain density smoothly during given time (in seconds). Zero time means immediate change. Rain zero is no rain, rain one in maximum rain. Rain is not possible when overcast is smaller than 0.7.
Example:
60 rain 1
time setOvercast overcast
Operand types:
time: Number
overcast: Number
Type of returned value:
Nothing
Description:
Set overcast to given value smoothly during given time (in seconds). Zero time means immediate change. Zero overcast means clear (sunny) weather, with overcast one storms and rain is very likely.
Example:
1800 setOvercast 0.5
time setFog fog
Operand types:
time: Number
fog: Number
Type of returned value:
Nothing
Description:
Set fog value smoothly during given time (in seconds). Zero time means immediate change. Fog zero is minimum fog, one is maximum fog.
Example:
1800 setFog 0.5
You should do alright with the above.
/edit
btw, they're all from the official command reference, which is a fabulous document to own and can be found from the editors depot under references.
-
Read the comref! Like a book! Read it! More than once!
-
You can also use 'SetAccTime x' (where x is a number) to speedup or slow down time (eg 2 will double, 0.5 will halve). If you've played Resistance, this command is used on the clock in the very first mission where it spins around fast for 3 hours. That uses setAccTime 200 or something like that.
Hope this helps in ANY way