setOvercast: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Adjusted mo note)
 
(64 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
|game1= ofp
|version1= 1.00


|1.00|= Game version
|game2= ofpe
|version2= 1.00


|eff= local |= Effects in MP
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| Set overcast to given value smoothly during given time (in seconds). Zero time means immediate change. An overcast setting of zero means clear (sunny) weather, and one means storms and rain are very likely. Higher overcast values also result in higher [[wind]] speeds. |= Description
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| time '''setOvercast''' overcast |= Syntax
|game5= arma2oa
|version5= 1.50


|p1= time: [[Number]]. In seconds |= Parameter 1
|game6= tkoh
|version6= 1.00


|p2= overcast: [[Number]]. Range 0 to 1 |= Parameter 2
|game7= arma3
|version7= 0.50


| [[Nothing]] |= Return value
|gr1= Environment
____________________________________________________________________________________________
 
|x1= <pre>50 setOvercast 0.5</pre> |= Example 1
____________________________________________________________________________________________
| mp = Each client and the server can have differing overcast values. |= Multiplayer


| [[overcast]], [[nextWeatherChange]], [[simulSetHumidity]] |= See also
|eff= local


}}
|descr= Set overcast to given value smoothly during given time (in seconds). Zero time means immediate change.
An overcast setting of zero means clear (sunny) weather, and one means storms and rain are very likely. Higher overcast values also result in higher [[wind]] speeds.
 
|mp= '''Pre {{arma3}}:''' Each client and the server can have differing overcast values. {{Feature|arma3|In {{arma3}} weather values are periodically synchronised with the server.}}
 
|s1= time [[setOvercast]] overcast


<h3 style="display:none">Notes</h3>
|p1= time: [[Number]] - in seconds
<dl class="command_description">
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on August 4, 2006 - 12:00
|p2= overcast: [[Number]] - in range 0..1
<dt class="note">'''[[User:Hardrock|hardrock]]'''<dd class="note">''Notes from before the conversion:''


Use [[setRain]] if you want to make sure it rains.
|r1= [[Nothing]]


|x1= <sqf>60 setOvercast 0.5;</sqf>


<dd class="notedate">
|seealso= [[overcast]] [[nextWeatherChange]] [[simulSetHumidity]]
<dt class="note">'''[[User:Ceeeb|Ceeeb]]'''<dd class="note">Only one script command induced weather change (either setOvercast or [[setFog]]) can be happening at a time. Starting a new weather change will immediately halt the current weather change. [[setRain|SetRain]] changes are independent and can occur simultaneously to a weather change.
}}


<dd class="notedate">
{{Note
<dt class="note">'''[[User:Joris|Joris]]'''<dd class="note">[[Arma 3|Arma 3]]'s volumetric clouds cannot be instantly changed (it would take up to a few seconds to do a full recompute). Therefore, ''0 setOvercast 0'' will not have the desired effect. You can use [[skipTime|skipTime]] to get to the desired cloud coverage.
|user= Hardrock
|timestamp= 20060804140000
|text= ''Notes from before the conversion:''


NOTE: To get instant, seamless overcast change to overcast 1 advance the time 24 hours with [[skipTime]] while setting overcast transition time to 86400 seconds (24 hours) -- [[User:Killzone_Kid|Killzone_Kid]]
Use [[setRain]] if you want to make sure it rains.
}}


<code>86400 [[setOvercast]] 1;
{{Note
[[skipTime]] 24;
|user= Ceeeb
|timestamp= 20070420042400
|text= Only one script command induced weather change (either setOvercast or [[setFog]]) can be happening at a time. Starting a new weather change will immediately halt the current weather change. [[setRain|SetRain]] changes are independent and can occur simultaneously to a weather change.
}}


//to remain on the same date:
{{Note
[[skipTime]] -24;
|user= DnA
86400 [[setOvercast]] 1;
|timestamp= 20130814112200
[[skipTime]] 24;
|text= {{arma3}}'s volumetric clouds cannot be instantly changed (it would take up to a few seconds to do a full recompute). Therefore, ''0 setOvercast 0'' will not have the desired effect. You can use [[skipTime|skipTime]] to get to the desired cloud coverage.
</code>


<dd class="notedate">
<br><br>
<dt class="note">'''[[User:Killzone_Kid|Killzone_Kid]]'''<dd class="note">With removal of [[simulSetHumidity‎]], in order to add instant cloud cover, execute [[simulWeatherSync]] with delay (for now):
NOTE: To get instant, seamless overcast change to overcast 1 advance the time 24 hours with [[skipTime]] while setting overcast transition time to 86400 seconds (24 hours) - [[User:Killzone_Kid|Killzone_Kid]] (12:08, 15 August 2013)
<code>[[skipTime]] -24;
86400 [[setOvercast]] 1;
[[skipTime]] 24;
0 = [] [[spawn]] {
[[sleep]] 0.1;
[[simulWeatherSync]];
};</code>
There is slight freeze with simul command.


<sqf>
86400 setOvercast 1;
skipTime 24;


<!-- Note Section END -->
// to remain on the same date:
</dl>
skipTime -24;
86400 setOvercast 1;
skipTime 24;
</sqf>
}}


<h3 style="display:none">Bottom Section</h3>
{{Note
|user= Killzone_Kid
|timestamp= 20131028110600
|text= With removal of [[simulSetHumidity]], in order to add instant cloud cover, execute [[simulWeatherSync]] with delay (for now):
<sqf>
skipTime -24;
86400 setOvercast 1;
skipTime 24;
0 = [] spawn {
sleep 0.1;
simulWeatherSync;
};
</sqf>
There is slight freeze with simul command.
}}


[[Category:Scripting Commands|SETOVERCAST]]
{{Note
[[Category:Scripting Commands OFP 1.96|SETOVERCAST]]
|user= Adanteh
[[Category:Scripting Commands OFP 1.46|SETOVERCAST]]
|timestamp= 20150821195800
[[Category:Scripting Commands ArmA|SETOVERCAST]]
|text= Delay in {{arma3}} doesn't work for quick changes. Using 120 [[setOvercast]] 1 only reaches full overcast after about 50 minutes.
[[Category:Scripting Commands ArmA2|SETOVERCAST]]
Using [[setTimeMultiplier]] does speed up the overcast, but it doesn't render any clouds.
[[Category:Command_Group:_Environment|SETOVECRAST]]
You will need to [[skipTime]] or [[forceWeatherChange]] to render clouds if you want it to happen within the hour.
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
{{Note
|user= AgentRev
|timestamp= 20160505004100
|text= Actual transition time is inversely proportional to the [[timeMultiplier]]. For example, a time of 7200 (2 hours) and a timeMultiplier of 2 will result in a real-life transition time of 7200 / 2 = 3600 (1 hour).<br>
In case of overcast, a timeMultiplier > 1 will cause gradual desyncing of the cloud cover with the [[overcast]] value, so it is advised that you multiply the transition time by the multiplier, i.e. :
<sqf>(7200 * timeMultiplier) setOvercast 1</sqf>
}}

Latest revision as of 12:00, 15 January 2024

Hover & click on the images for description

Description

Description:
Set overcast to given value smoothly during given time (in seconds). Zero time means immediate change. An overcast setting of zero means clear (sunny) weather, and one means storms and rain are very likely. Higher overcast values also result in higher wind speeds.
Multiplayer:
Pre Arma 3: Each client and the server can have differing overcast values.
Arma 3
In Arma 3 weather values are periodically synchronised with the server.
Groups:
Environment

Syntax

Syntax:
time setOvercast overcast
Parameters:
time: Number - in seconds
overcast: Number - in range 0..1
Return Value:
Nothing

Examples

Example 1:
60 setOvercast 0.5;

Additional Information

See also:
overcast nextWeatherChange simulSetHumidity

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Hardrock - c
Posted on Aug 04, 2006 - 14:00 (UTC)
Notes from before the conversion: Use setRain if you want to make sure it rains.
Ceeeb - c
Posted on Apr 20, 2007 - 04:24 (UTC)
Only one script command induced weather change (either setOvercast or setFog) can be happening at a time. Starting a new weather change will immediately halt the current weather change. SetRain changes are independent and can occur simultaneously to a weather change.
DnA - c
Posted on Aug 14, 2013 - 11:22 (UTC)
Arma 3's volumetric clouds cannot be instantly changed (it would take up to a few seconds to do a full recompute). Therefore, 0 setOvercast 0 will not have the desired effect. You can use skipTime to get to the desired cloud coverage.

NOTE: To get instant, seamless overcast change to overcast 1 advance the time 24 hours with skipTime while setting overcast transition time to 86400 seconds (24 hours) - Killzone_Kid (12:08, 15 August 2013)
86400 setOvercast 1; skipTime 24; // to remain on the same date: skipTime -24; 86400 setOvercast 1; skipTime 24;
Killzone_Kid - c
Posted on Oct 28, 2013 - 11:06 (UTC)
With removal of simulSetHumidity, in order to add instant cloud cover, execute simulWeatherSync with delay (for now):
skipTime -24; 86400 setOvercast 1; skipTime 24; 0 = [] spawn { sleep 0.1; simulWeatherSync; };
There is slight freeze with simul command.
Adanteh - c
Posted on Aug 21, 2015 - 19:58 (UTC)
Delay in Arma 3 doesn't work for quick changes. Using 120 setOvercast 1 only reaches full overcast after about 50 minutes. Using setTimeMultiplier does speed up the overcast, but it doesn't render any clouds. You will need to skipTime or forceWeatherChange to render clouds if you want it to happen within the hour.
AgentRev - c
Posted on May 05, 2016 - 00:41 (UTC)
Actual transition time is inversely proportional to the timeMultiplier. For example, a time of 7200 (2 hours) and a timeMultiplier of 2 will result in a real-life transition time of 7200 / 2 = 3600 (1 hour).
In case of overcast, a timeMultiplier > 1 will cause gradual desyncing of the cloud cover with the overcast value, so it is advised that you multiply the transition time by the multiplier, i.e. :
(7200 * timeMultiplier) setOvercast 1