{"name":"BIS_fnc_objectsGrabber","title":"BIS fnc objectsGrabber","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_objectsGrabber","revid":330763,"updated":"2022-11-01T15:44:49Z","groups":["Object Manipulation"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Converts a set of placed objects to an object array (**as a String**) for the DynO mapper.\nFormat is the following. First, the header:\n\nThen, data:\n\n```sqf\n[\n    [\"B_UAV_01_F\",[-5.23706,-0.183594,-0.00126648],167.39,1,0,[0.605018,-0.575293],\"\",\"\",true,false],\n    [\"C_Offroad_01_F\",[-4.25903,4.62158,0.0630951],224.14,1,0,[0.812812,0.190543],\"\",\"\",true,false]\n]\n```\n\nor, if object orientation is not used:\n\n```sqf\n[\n    [\"B_UAV_01_F\",[-5.23706,-0.183594,-0.00126648],167.39,1,0,[],\"\",\"\",true,false],\n    [\"C_Offroad_01_F\",[-4.25903,4.62158,0.0630951],224.14,1,0,[],\"\",\"\",true,false]\n]\n```","syntaxes":[{"syntax":"[position, size, objectOrientation] call BIS_fnc_objectsGrabber","params":[{"name":"position","type":"Position","optional":true,"default":"[0,0]","description":"2D or 3D position, center of the \"grabbing\" area","type_expr":"Position","text":"position: Position - (Optional, default [0,0]) 2D or 3D position, center of the \"grabbing\" area"},{"name":"size","type":"Number","optional":true,"default":"50","description":"size (radius) of the \"grabbing\" area","type_expr":"Number","text":"size: Number - (Optional, default 50) size (radius) of the \"grabbing\" area"},{"name":"objectOrientation","type":"Boolean","optional":true,"default":"false","description":"capture object orientation or not. Format BIS_fnc_getPitchBank","type_expr":"Boolean","text":"objectOrientation: Boolean - (Optional, default false) capture object orientation or not. Format BIS_fnc_getPitchBank"}],"returns":{"type":"String","type_expr":"String","description":"arrays are in format [classname, relPos, azimuth, fuel, damage, pitchBankResult, vehicleVarName, initCommands, simulationEnabled, isASL]:\n- classname: String - relPos: Array - azimuth: Number - fuel: Number - damage: Number - pitchBankResult: Array - return from BIS_fnc_getPitchBank (only if objectOrientation is true) - vehicleVarName: String - initCommands: String - simulationEnabled: Boolean - isASL: Boolean","text":"String - arrays are in format [classname, relPos, azimuth, fuel, damage, pitchBankResult, vehicleVarName, initCommands, simulationEnabled, isASL]:\n\n- classname: String\n- relPos: Array\n- azimuth: Number\n- fuel: Number\n- damage: Number\n- pitchBankResult: Array - return from BIS_fnc_getPitchBank (only if *objectOrientation* is true)\n- vehicleVarName: String\n- initCommands: String\n- simulationEnabled: Boolean\n- isASL: Boolean"}}],"examples":[{"code":["[getPos player, 20, true] call BIS_fnc_objectsGrabber;"]}],"see_also":["BIS_fnc_objectsMapper","BIS_fnc_getPitchBank","BIS_fnc_setPitchBank"],"docblock":{"text":"Grab data:\nMission: TheMissionName\nWorld: Stratis\nAnchor position: [3781.59, 3289.67]\nArea size: 50\nUsing orientation of objects: yes/no"}}