BIS fnc objectsGrabber: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Found in arma 3 under A2 Functions. Unknown version. mentioned in spotrep 04)
 
m (Text replacement - "|= Game name" to "|Game name=")
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{Function|Comments=
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma2 |= Game name
| arma2 |Game name=


|?|= Game version
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/*
| Converts a set of placed objects to an object array ('''as a [[String]]''') for the [[BIS_fnc_ObjectsMapper|DynO mapper]].<br />
File: objectGrabber.sqf
Format is the following. First, the header:
Author: Joris-Jan van 't Land
<code>{{codecomment|/*
Grab data:
Mission: TheMissionName
World: Stratis
Anchor position: [3781.59, 3289.67]
Area size: 50
Using orientation of objects: yes/no
<nowiki>*/</nowiki>}}</code>


Description:
Then, data:
Converts a set of placed objects to an object array for the DynO mapper.
<code>[
Places this information in the debug output for processing.
["B_UAV_01_F",[-5.23706,-0.183594,-0.00126648],167.39,1,0,[0.605018,-0.575293],"","",true,false],
["C_Offroad_01_F",[-4.25903,4.62158,0.0630951],224.14,1,0,[0.812812,0.190543],"","",true,false]
]</code>


Parameter(s):
or, if object orientation is not used:
_this select 0: position of the anchor point (Array)
<code>[
_this select 1: size of the covered area (Scalar)
["B_UAV_01_F",[-5.23706,-0.183594,-0.00126648],167.39,1,0,[],"","",true,false],
_this select 2: grab object orientation? (Boolean) [default: false]
["C_Offroad_01_F",[-4.25903,4.62158,0.0630951],224.14,1,0,[],"","",true,false]
]</code> |DESCRIPTION=
Returns:
Ouput text (String)
*/
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_sortBy]]; --> |= Syntax
| [position, size, objectOrientation] call [[BIS_fnc_ObjectsGrabber]] |SYNTAX=
 
|p1= position: [[Position]] - (Optional, default [0,0]) 2D or 3D position, center of the "grabbing" area |PARAMETER1=
 
|p2= size: [[Number]] - (Optional, default 50) size (radius) of the "grabbing" area |PARAMETER2=


|p1= |= Parameter 1
|p3= objectOrientation: [[Boolean]] - (Optional, default [[false]]) capture object orientation or not. Format [[BIS_fnc_getPitchBank]] |PARAMETER3=


| |= Return value
| [[String]] |RETURNVALUE=
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code><nowiki>[</nowiki>[[getPos]] [[player]], 20, [[true]]] [[call]] [[BIS_fnc_ObjectsGrabber]];</code> |EXAMPLE1=
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[BIS_fnc_ObjectsMapper]], [[BIS_fnc_getPitchBank]], [[BIS_fnc_setPitchBank]] |SEEALSO=
 
}}
}}


Line 49: Line 56:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Arrays|{{uc:sortBy}}]]
[[Category:Function Group: Spawning|{{uc:ObjectsGrabber}}]]
[[Category:Functions|{{uc:sortBy}}]]
[[Category:Functions|{{uc:ObjectsGrabber}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:sortBy}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:ObjectsGrabber}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:ObjectsGrabber}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:ObjectsGrabber}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:ObjectsGrabber}}]]

Revision as of 01:04, 31 August 2019

Hover & click on the images for description

Description

Description:
Converts a set of placed objects to an object array (as a String) for the DynO mapper.
Format is the following. First, the header: /* Grab data: Mission: TheMissionName World: Stratis Anchor position: [3781.59, 3289.67] Area size: 50 Using orientation of objects: yes/no */ Then, data: [ ["B_UAV_01_F",[-5.23706,-0.183594,-0.00126648],167.39,1,0,[0.605018,-0.575293],"","",true,false], ["C_Offroad_01_F",[-4.25903,4.62158,0.0630951],224.14,1,0,[0.812812,0.190543],"","",true,false] ] or, if object orientation is not used: [ ["B_UAV_01_F",[-5.23706,-0.183594,-0.00126648],167.39,1,0,[],"","",true,false], ["C_Offroad_01_F",[-4.25903,4.62158,0.0630951],224.14,1,0,[],"","",true,false] ]
Execution:
call
Groups:
Uncategorised

Syntax

Syntax:
[position, size, objectOrientation] call BIS_fnc_ObjectsGrabber
Parameters:
position: Position - (Optional, default [0,0]) 2D or 3D position, center of the "grabbing" area
size: Number - (Optional, default 50) size (radius) of the "grabbing" area
objectOrientation: Boolean - (Optional, default false) capture object orientation or not. Format BIS_fnc_getPitchBank
Return Value:
String

Examples

Example 1:
[getPos player, 20, true] call BIS_fnc_ObjectsGrabber;

Additional Information

See also:
BIS_fnc_ObjectsMapperBIS_fnc_getPitchBankBIS_fnc_setPitchBank

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

Notes

Bottom Section