BIS fnc sceneAreaClearance: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>(\[[a-zA-Z0-9_, ]*\] )?\[\[(call|spawn)\]\] \[\[(BI[NS]\_fnc\_[a-zA-Z0-9_]+)\]\];?<\/code>" to "<sqf>$1$2 $3;</sqf>")
m (Text replacement - "code>_([a-zA-Z0-9_]+) = " to "code>private _$1 = ")
Line 39: 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>[[private]] _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]]
{
{

Revision as of 12:06, 6 May 2022

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): private _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;