BIS fnc objectsMapper: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...)
Line 1: Line 1:
{{Function|Comments=
{{Function


| arma2 |Game name=
| arma2


|1.00|Game version=
|1.00


|gr1 = Object Manipulation |GROUP1=
|gr1 = Object Manipulation


| Takes an array of data about a dynamic object template and creates the objects. |DESCRIPTION=
| Takes an array of data about a dynamic object template and creates the objects.


Parameter(s):
Parameter(s):
Line 18: Line 18:
Created objects (Array)
Created objects (Array)


| [position, azimuth, objectsArray, badChance] call [[BIS_fnc_ObjectsMapper]] |SYNTAX=
| [position, azimuth, objectsArray, badChance] call [[BIS_fnc_ObjectsMapper]]


|p1= position: [[Position]] - (Optional, default [0,0]) |PARAMETER1=
|p1= position: [[Position]] - (Optional, default [0,0])


|p2= azimuth: [[Number]] - (Optional, default 0) the template orientation |PARAMETER2=
|p2= azimuth: [[Number]] - (Optional, default 0) the template orientation


|p3= objectsArray: [[Array]] - created with [[BIS_fnc_objectsGrabber]] |PARAMETER3=
|p3= objectsArray: [[Array]] - created with [[BIS_fnc_objectsGrabber]]


|p4= badChance: [[Number]] - (Optional, default 0) must be in range 0..1. Chances of object non-creation for each object |PARAMETER4=
|p4= badChance: [[Number]] - (Optional, default 0) must be in range 0..1. Chances of object non-creation for each object


| [[Array]] of [[Object|Objects]] |RETURNVALUE=
| [[Array]] of [[Object|Objects]]


|x1= <code>_objectsArray = [
|x1= <code>_objectsArray = [
Line 34: Line 34:
["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]
];
];
<nowiki>[</nowiki>[[getMarkerPos]] "myBase", 0, _objectsArray, 0.5] [[call]] [[BIS_fnc_objectsMapper]];</code> |EXAMPLE1=
<nowiki>[</nowiki>[[getMarkerPos]] "myBase", 0, _objectsArray, 0.5] [[call]] [[BIS_fnc_objectsMapper]];</code>


| [[BIS_fnc_objectsGrabber]] |SEEALSO=
| [[BIS_fnc_objectsGrabber]]
}}
}}



Revision as of 23:40, 17 January 2021

Hover & click on the images for description

Description

Description:
Takes an array of data about a dynamic object template and creates the objects. Parameter(s): _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: Created objects (Array)
Execution:
call
Groups:
Object Manipulation

Syntax

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

Examples

Example 1:
_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

Bottom Section