simulCloudOcclusion: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(overhaul, added warning about return value)
m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(29 intermediate revisions by 2 users not shown)
Line 2: Line 2:


|game1= arma3
|game1= arma3
|version1= 1.00
|version1= 1.00


Line 8: Line 7:


|descr= Returns clouds occlusion between two given points.
|descr= Returns clouds occlusion between two given points.
|pr= {{Feature|Eden Editor|SimulWeather seems to be disabled in [[:Category:Eden Editor|Eden Editor]] and scenario preview.}}


|s1= [[simulCloudOcclusion]] [pos1, pos2]
|s1= [[simulCloudOcclusion]] [pos1, pos2]
Line 15: Line 16:
|p2= pos2: [[Position]]
|p2= pos2: [[Position]]


|r1= [[Number]] - (0 - no clouds, 1 - full clouds) {{Feature|warning|In {{GVI|arma3|2.03}} this command returns a [[Boolean]]}}
|r1=  
* [[Number]] - (0 - no clouds, 1 - full clouds)
* [[Nothing]] - If arguments are incorrect
* [[Boolean]] - Returns [[false]] if simulWeather is disabled


|x1= <code>[[private]] _posPlayer [[a = b|=]] [[getPos]] [[player]];
|x1= <sqf>
[[private]] _posAbovePlayer [[a = b|=]] [[+]]_posPlayer; _posAbovePlayer [[set]] [2,200];
private _posPlayer = getPos player;
_posAbovePlayer [[a = b|=]] _posPlayer; _posAbovePlayer [[set]] [2,200];
private _posAbovePlayer = +_posPlayer; _posAbovePlayer set [2,200];
[[simulCloudOcclusion]] [_posPlayer, _posAbovePlayer];</code>
simulCloudOcclusion [_posPlayer, _posAbovePlayer];
</sqf>


|seealso= [[setSimulWeatherLayers]], [[simulCloudDensity]], [[simulInClouds]]
|seealso= [[setSimulWeatherLayers]] [[simulCloudDensity]] [[simulInClouds]]
}}
}}


<dl class='command_description'>
<dl class="command_description">
<!-- Note Section BEGIN -->


<dt><dt>
<dd class="notedate">Posted on 8 August, 2014 - 12:17</dd>
<dd class="notedate">Posted on 8 August, 2014 - 12:17</dd>
<dt class="note">[[User:Waffle SS.|Waffle SS.]]</dt>
<dt class="note">[[User:Waffle SS.|Waffle SS.]]</dt>
<dd class="note">The '''simulCloudOcclusion''' command is not recognized on dedicated servers, and will produce an error.  If you use this command, it '''cannot''' be anywhere within a script that is run on the dedicated server, or the entire script will halt.  To get around this, you can use: <code>if ![[isDedicated]] then {[] [[execVM]] "simulCloudOcclusionScript.sqf"};</code>
<dd class="note">The '''simulCloudOcclusion''' command is not recognized on dedicated servers, and will produce an error.  If you use this command, it '''cannot''' be anywhere within a script that is run on the dedicated server, or the entire script will halt.  To get around this, you can use:
<sqf>if !isDedicated then {[] execVM "simulCloudOcclusionScript.sqf"};</sqf>


<!-- Note Section END -->
</dl>
</dl>
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 11:34, 3 September 2024

Hover & click on the images for description

Description

Description:
Returns clouds occlusion between two given points.
Problems:
Eden Editor
SimulWeather seems to be disabled in Eden Editor and scenario preview.
Groups:
Environment

Syntax

Syntax:
simulCloudOcclusion [pos1, pos2]
Parameters:
pos1: Position
pos2: Position
Return Value:
  • Number - (0 - no clouds, 1 - full clouds)
  • Nothing - If arguments are incorrect
  • Boolean - Returns false if simulWeather is disabled

Examples

Example 1:
private _posPlayer = getPos player; private _posAbovePlayer = +_posPlayer; _posAbovePlayer set [2,200]; simulCloudOcclusion [_posPlayer, _posAbovePlayer];

Additional Information

See also:
setSimulWeatherLayers simulCloudDensity simulInClouds

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
Posted on 8 August, 2014 - 12:17
Waffle SS.
The simulCloudOcclusion command is not recognized on dedicated servers, and will produce an error. If you use this command, it cannot be anywhere within a script that is run on the dedicated server, or the entire script will halt. To get around this, you can use:
if !isDedicated then {[] execVM "simulCloudOcclusionScript.sqf"};