BIS fnc objectsMapper: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "(\|p[0-9]+ *= *[^(]+\(Optional(, default[^)]*)\) )C([a-z])" to "$1c$3")
 
(40 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


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


| <pre>/*
|game4= arma3
File: objectMapper.sqf
|version4= 0.50


Description:
|gr1= Object Manipulation
Takes an array of data about a dynamic object template and creates the objects.


Parameter(s):
|descr= Takes an array of data about a dynamic object template and creates the objects.
_this select 0: position of the template - Array [X, Y, Z]
_this select 1: azimuth of the template in degrees - Number
_this select 2: objects for the template - Array / composition class - String / tag list - Array
_this select 3: (optional) randomizer value (how much chance each object has of being created. 0.0 is 100% chance) - Number


Returns:
|s1= [position, azimuth, objectsArray, badChance] call [[BIS_fnc_objectsMapper]]
Created objects (Array)
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p1= position: [[Array]] - (Optional, default [0,0]) in format [[Position|Position2D]]
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_ObjectsMapper]]; --> |= Syntax
|p2= azimuth: [[Number]] - (Optional, default 0) the template orientation


|p1= |= Parameter 1
|p3= objectsArray: [[Array]] - created with [[BIS_fnc_objectsGrabber]]


| |= Return value
|p4= badChance: [[Number]] - (Optional, default 0) chances of object non-creation for each object, in range 0..1
____________________________________________________________________________________________


|x1= <code></code> |=
|r1= [[Array]] of [[Object]]s
____________________________________________________________________________________________


| |= See also
|x1= <sqf>private _objectsArray = [
["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]
];
[getMarkerPos "myBase", 0, _objectsArray, 0.5] call BIS_fnc_objectsMapper;</sqf>


|seealso= [[BIS_fnc_objectsGrabber]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Spawning|{{uc:ObjectsMapper}}]]
[[Category:Functions|{{uc:ObjectsMapper}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:ObjectsMapper}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:ObjectsMapper}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:ObjectsMapper}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:ObjectsMapper}}]]

Latest revision as of 12:22, 8 November 2023

Hover & click on the images for description

Description

Description:
Takes an array of data about a dynamic object template and creates the objects.
Execution:
call
Groups:
Object Manipulation

Syntax

Syntax:
[position, azimuth, objectsArray, badChance] call BIS_fnc_objectsMapper
Parameters:
position: Array - (Optional, default [0,0]) in format Position2D
azimuth: Number - (Optional, default 0) the template orientation
objectsArray: Array - created with BIS_fnc_objectsGrabber
badChance: Number - (Optional, default 0) chances of object non-creation for each object, in range 0..1
Return Value:
Array of Objects

Examples

Example 1:
private _objectsArray = [ ["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] ]; [getMarkerPos "myBase", 0, _objectsArray, 0.5] call BIS_fnc_objectsMapper;

Additional Information

See also:
BIS_fnc_objectsGrabber

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