BIS fnc objectsGrabber: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|Game version=" to "|Game version= |gr1 = Object Manipulation |GROUP1=")
m (Text replacement - " |s1=[" to " |s1= [")
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma2 |Game name=
|game1= arma2
|version1= 1.00


|1.00|Game version=
|game2= arma2oa
|version2= 1.50


|gr1 = Object Manipulation |GROUP1=
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| Converts a set of placed objects to an object array ('''as a [[String]]''') for the [[BIS_fnc_ObjectsMapper|DynO mapper]].<br>
|game4= arma3
|version4= 0.50
 
|gr1= Object Manipulation
 
|descr= Converts a set of placed objects to an object array ('''as a [[String]]''') for the [[BIS_fnc_objectsMapper|DynO mapper]].<br>
Format is the following. First, the header:
Format is the following. First, the header:
<code>{{codecomment|/*
<sqf>
/*
Grab data:
Grab data:
Mission: TheMissionName
Mission: TheMissionName
Line 18: Line 25:
Area size: 50
Area size: 50
Using orientation of objects: yes/no
Using orientation of objects: yes/no
<nowiki>*/</nowiki>}}</code>
*/
</sqf>


Then, data:
Then, data:
<code>[
<sqf>[
["B_UAV_01_F",[-5.23706,-0.183594,-0.00126648],167.39,1,0,[0.605018,-0.575293],"","",true,false],  
["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]
["C_Offroad_01_F",[-4.25903,4.62158,0.0630951],224.14,1,0,[0.812812,0.190543],"","",true,false]
]</code>
]</sqf>


or, if object orientation is not used:
or, if object orientation is not used:
<code>[
<sqf>[
["B_UAV_01_F",[-5.23706,-0.183594,-0.00126648],167.39,1,0,[],"","",true,false],  
["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]
["C_Offroad_01_F",[-4.25903,4.62158,0.0630951],224.14,1,0,[],"","",true,false]
]</code> |DESCRIPTION=
]</sqf>
____________________________________________________________________________________________


| [position, size, objectOrientation] call [[BIS_fnc_ObjectsGrabber]] |SYNTAX=
|s1= [position, size, objectOrientation] call [[BIS_fnc_objectsGrabber]]


|p1= position: [[Position]] - (Optional, default [0,0]) 2D or 3D position, center of the "grabbing" area |PARAMETER1=
|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 |PARAMETER2=
|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]] |PARAMETER3=
|p3= objectOrientation: [[Boolean]] - (Optional, default [[false]]) capture object orientation or not. Format [[BIS_fnc_getPitchBank]]


| [[String]] |RETURNVALUE=
|r1= [[String]]
____________________________________________________________________________________________


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


| [[BIS_fnc_ObjectsMapper]], [[BIS_fnc_getPitchBank]], [[BIS_fnc_setPitchBank]] |SEEALSO=
|seealso= [[BIS_fnc_objectsMapper]] [[BIS_fnc_getPitchBank]] [[BIS_fnc_setPitchBank]]
}}
}}


<h3 style="display:none">Notes</h3>
{{Note
<dl class="command_description">
|user= 7erra
<!-- Note Section BEGIN -->
|timestamp= 20211016123337
 
|text= The format of each entry is as follows:
<!-- Note Section END -->
<sqf>0: STRING - Classname
</dl>
1: ARRAY - Position [delta X, delta Y, z]
 
2: NUMBER - Azimuth
<h3 style="display:none">Bottom Section</h3>
3: NUMBER - Fuel
[[Category:Function Group: Spawning|{{uc:ObjectsGrabber}}]]
4: NUMBER - Damage
[[Category:Functions|{{uc:ObjectsGrabber}}]]
5: ARRAY - Return from BIS_fnc_getPitchBank (only if 2nd param is true)
[[Category:{{Name|arma2}}: Functions|{{uc:ObjectsGrabber}}]]
6: STRING - vehicleVarName
[[Category:{{Name|arma2oa}}: Functions|{{uc:ObjectsGrabber}}]]
7: STRING - Initialization commands
[[Category:{{Name|tkoh}}: Functions|{{uc:ObjectsGrabber}}]]
8: BOOLEAN - Enable simulation
[[Category:{{Name|arma3}}: Functions|{{uc:ObjectsGrabber}}]]
9: BOOLEAN - Position is ASL</sqf>
}}

Revision as of 00:11, 13 July 2022

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_objectsMapper BIS_fnc_getPitchBank BIS_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
7erra - c
Posted on Oct 16, 2021 - 12:33 (UTC)
The format of each entry is as follows:
0: STRING - Classname 1: ARRAY - Position [delta X, delta Y, z] 2: NUMBER - Azimuth 3: NUMBER - Fuel 4: NUMBER - Damage 5: ARRAY - Return from BIS_fnc_getPitchBank (only if 2nd param is true) 6: STRING - vehicleVarName 7: STRING - Initialization commands 8: BOOLEAN - Enable simulation 9: BOOLEAN - Position is ASL