BIS fnc objectsGrabber: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "\|+$" to "")
(33 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma2
____________________________________________________________________________________________
|version1= 1.00


| arma2 |= Game name
|game2= arma2oa
|version2= 1.50


|?|= Game version
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| Converts a set of placed objects within a specified area, to an object array for use with the DynO mapper. The information is copied to the clipboard and returned via [[call]] as a string. |= Description
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| <!-- [position, radius, (getDir)] call [[BIS_fnc_objectsGrabber]]; --> |= Syntax
|gr1= Object Manipulation


|p1= '''Anchor''': [[Array]] - Position of center. |=
|descr= Converts a set of placed objects to an object array ('''as a [[String]]''') for the [[BIS_fnc_objectsMapper|DynO mapper]].<br>
|p2= '''Radius''': [[Number]] - Size of area. |=
Format is the following. First, the header:
|p3= '''getDir''': [[Boolean]] - (optional) grab direction of objects. |=
<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>


| [[string]] - Output text used as parameter for [[BIS_fnc_objectsGrabber]] |= Return value
Then, data:
____________________________________________________________________________________________
<code>[
["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>


|x1= <code>[getPos player, 200, true] [[call]] [[BIS_fnc_objectsGrabber]];</code> |=
or, if object orientation is not used:
____________________________________________________________________________________________
<code>[
["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]
]</code>


| [[BIS_fnc_ObjectsMapper]] |= See also
|s1=[position, size, objectOrientation] call [[BIS_fnc_objectsGrabber]]


}}
|p1= position: [[Position]] - (Optional, default [0,0]) 2D or 3D position, center of the "grabbing" area
 
|p2= size: [[Number]] - (Optional, default 50) size (radius) of the "grabbing" area
 
|p3= objectOrientation: [[Boolean]] - (Optional, default [[false]]) capture object orientation or not. Format [[BIS_fnc_getPitchBank]]


<h3 style="display:none">Notes</h3>
|r1= [[String]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <code><nowiki>[</nowiki>[[getPos]] [[player]], 20, [[true]]] [[call]] [[BIS_fnc_objectsGrabber]];</code>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[BIS_fnc_objectsMapper]], [[BIS_fnc_getPitchBank]], [[BIS_fnc_setPitchBank]]
[[Category:Function Group: Spawning|{{uc:sortBy}}]]
}}
[[Category:Functions|{{uc:sortBy}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:sortBy}}]]

Revision as of 00:12, 17 June 2021

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:
Object Manipulation

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