BIS fnc objectsGrabber: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|+$" to "") |
Lou Montana (talk | contribs) m (Fix SQF) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 17: | Line 17: | ||
|descr= Converts a set of placed objects to an object array ('''as a [[String]]''') for the [[BIS_fnc_objectsMapper|DynO mapper]].<br> | |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: | ||
< | <sqf> | ||
/* | |||
Grab data: | Grab data: | ||
Mission: TheMissionName | Mission: TheMissionName | ||
Line 24: | Line 25: | ||
Area size: 50 | Area size: 50 | ||
Using orientation of objects: yes/no | Using orientation of objects: yes/no | ||
*/ | |||
</sqf> | |||
Then, data: | Then, data: | ||
< | <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] | ||
]</ | ] | ||
</sqf> | |||
or, if object orientation is not used: | or, if object orientation is not used: | ||
< | <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] | ||
]</ | ] | ||
</sqf> | |||
|s1=[position, size, objectOrientation] call [[BIS_fnc_objectsGrabber]] | |s1= [position, size, objectOrientation] call [[BIS_fnc_objectsGrabber]] | ||
|p1= position: [[Position]] - (Optional, default [0,0]) 2D or 3D position, center of the "grabbing" area | |p1= position: [[Position]] - (Optional, default [0,0]) 2D or 3D position, center of the "grabbing" area | ||
Line 46: | Line 52: | ||
|p3= objectOrientation: [[Boolean]] - (Optional, default [[false]]) capture object orientation or not. Format [[BIS_fnc_getPitchBank]] | |p3= objectOrientation: [[Boolean]] - (Optional, default [[false]]) capture object orientation or not. Format [[BIS_fnc_getPitchBank]] | ||
|r1= [[String]] | |r1= [[String]] - arrays are in format [classname, relPos, azimuth, fuel, damage, pitchBankResult, vehicleVarName, initCommands, simulationEnabled, isASL]: | ||
* 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]] | |||
|x1= < | |x1= <sqf>[getPos player, 20, true] call BIS_fnc_objectsGrabber;</sqf> | ||
|seealso= [[BIS_fnc_objectsMapper]] | |seealso= [[BIS_fnc_objectsMapper]] [[BIS_fnc_getPitchBank]] [[BIS_fnc_setPitchBank]] | ||
}} | }} |
Latest revision as of 16:44, 1 November 2022
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:Then, data:/* Grab data: Mission: TheMissionName World: Stratis Anchor position: [3781.59, 3289.67] Area size: 50 Using orientation of objects: yes/no */or, if object orientation is not used: - 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 - arrays are in format [classname, relPos, azimuth, fuel, damage, pitchBankResult, vehicleVarName, initCommands, simulationEnabled, isASL]:
Examples
- Example 1:
Additional Information
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