BIS fnc sceneAreaClearance: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>0 = " to "<code>")
m (Some wiki formatting)
Line 1: Line 1:
{{RV|type=function
{{RV|type=function


| arma2
|game1= arma2
|1.00
|version1= 1.00


|game2= arma2oa
|game2= arma2oa
Line 15: Line 15:
|gr1= Scenes
|gr1= Scenes


| Removes object clutter within a set trigger, for use within cutscenes.
|descr= Removes object clutter within a set trigger, for use within cutscenes.


|s1= param spawn [[BIS_fnc_sceneAreaClearance]]
|s1= [trigger, objects, destination] spawn [[BIS_fnc_sceneAreaClearance]]


|p1= [[Object]] - Name of trigger to use as center point.
|p1= trigger: [[Object]] - trigger to use as center point
|p2= ''[[Array]] - List of objects that will be kept during cutscene. Optional parameter, default empty array.''


|p3= ''[[Array]] - Of format [[Position]], where to move all unwanted objects. Optional parameter, default [-5000, 10000, 0].''
|p2= objects: [[Array]] - (Optional, default []) list of objects that will be kept during cutscene
 
|p3= destination: [[Array]] in format [[Position]] - (Optional, default [-5000, 10000, 0]) where to move all unwanted objects


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>[triggerArea1] spawn BIS_fnc_sceneAreaClearance;</code>
|x1= <code>[triggerArea1] [[spawn]] [[BIS_fnc_sceneAreaClearance]];</code>
 
|seealso=
}}
}}
[[Category:{{Name|arma2}}: Functions|{{uc:sceneAreaClearance}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:sceneAreaClearance}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:sceneAreaClearance}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:sceneAreaClearance}}]]


<dl class="command_description">
<dl class="command_description">
Line 41: Line 39:
<dd class="note">
<dd class="note">
In regards to the 'safe position' where the objects get moved, this is how the function handles it (with default values present):
In regards to the 'safe position' where the objects get moved, this is how the function handles it (with default values present):
 
<code>_savepos = [_unwantedObjectsTempPosition, 0, 100, 20, 0, 60 * ([[pi]] / 180), 0] [[call]] [[BIS_fnc_findSafePos]];
<code>_savepos = [_unwantedObjectsTempPosition, 0, 100, 20, 0, 60 * (pi / 180), 0] call BIS_fnc_findSafePos;
[[if]] ((_savepos [[distance]] ([[getArray]] ([[configFile]] >> "CfgWorlds" >> [[worldName]] >> "centerPosition"))) == 0) [[then]]
  if((_savepos distance (getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"))) = 0) then
{
  {
_savepos = _unwantedObjectsTempPosition;
    _savepos = _unwantedObjectsTempPosition;
};
  };
_x [[setPos]] _savepos;
_x setpos _savepos;
</code>
</code>
If statement has double equals (comparison statement) but I'm not good enough to actually get wiki formatting right.
</dd>
</dd>


</dl>
</dl>

Revision as of 19:24, 13 June 2021

Hover & click on the images for description

Description

Description:
Removes object clutter within a set trigger, for use within cutscenes.
Execution:
call
Groups:
Scenes

Syntax

Syntax:
[trigger, objects, destination] spawn BIS_fnc_sceneAreaClearance
Parameters:
trigger: Object - trigger to use as center point
objects: Array - (Optional, default []) list of objects that will be kept during cutscene
destination: Array in format Position - (Optional, default [-5000, 10000, 0]) where to move all unwanted objects
Return Value:
Nothing

Examples

Example 1:
[triggerArea1] spawn BIS_fnc_sceneAreaClearance;

Additional Information

See also:
See also needed

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 October 2, 2014 - 16:29 (UTC)
Tryteyker-
In regards to the 'safe position' where the objects get moved, this is how the function handles it (with default values present): _savepos = [_unwantedObjectsTempPosition, 0, 100, 20, 0, 60 * (pi / 180), 0] call BIS_fnc_findSafePos; if ((_savepos distance (getArray (configFile >> "CfgWorlds" >> worldName >> "centerPosition"))) == 0) then { _savepos = _unwantedObjectsTempPosition; }; _x setPos _savepos;