getCompatiblePylonMagazines: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(added getCompatiblePylonMagazines description)
 
(alt syntax)
Line 12: Line 12:


| vehicle '''getCompatiblePylonMagazines''' pylon|= Syntax
| vehicle '''getCompatiblePylonMagazines''' pylon|= Syntax
|p1 = vehicle: [[Object]]
 
|p2 = pylon: [[Number]] or [[String]]
|p1 = vehicle: [[Object]] - aircraft object
* 0 - returns array of arrays containing all compatible magazines
|p2 = pylon: [[Number]] - pylon id or [[String]] - pylon class name from <tt>TransportPylonsComponent &gt;&gt; pylons</tt> class (see Example 4). 0 or "" to return all compatible magazines from all pylons
* x>1 - returns array of compatible magazines for third pylon
 
* [[String]] - classname of pylon from the
| [[Array]] |= Return value |= Return value
| [[Array]] |= Return value |= Return value
| s2=vehicleClass '''getCompatiblePylonMagazines''' pylon|= Syntax
|p21 = vehicleClass: [[String]] - aircraft config class
|p22 = pylon: [[Number]] - pylon id or [[String]] - pylon class name from <tt>TransportPylonsComponent &gt;&gt; pylons</tt> class (see Example 4). 0 or "" to return all compatible magazines from all pylons
| r2=[[Array]] |= Return value |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>vehicle player [[getCompatiblePylonMagazines]] 0; // returns array of arrays containing all compatible magazines</code> |= Example 1
|x1= <code>[[vehicle]] [[player]] [[getCompatiblePylonMagazines]] 0; // returns array of arrays containing all compatible magazines</code> |= Example 1
|x2= <code>vehicle player [[getCompatiblePylonMagazines]] 3; // returns array of compatible magazines for third pylon</code> |= Example 2
|x2= <code>"Plane_Fighter_01_Base_F" [[getCompatiblePylonMagazines]] 3; // returns array of compatible magazines for the 3rd pylon</code> |= Example 2
|x3= <code>vehicle player [[getCompatiblePylonMagazines]] "Pylons1"; // returns array of compatible magazines for Pylon1 located in TransportPylonsComponent >> Pylons class </code> |= Example 3
|x3= <code>jet1 [[getCompatiblePylonMagazines]] "pylon1"; // returns array of compatible magazines for the 1st pylon</code> |= Example 3
|x4= Get all pylon names for "Plane_Fighter_01_Base_F" <code>[[private]] _allPylons = "true" [[configClasses]] (
[[configFile]]
>>
"CfgVehicles"
>>
"Plane_Fighter_01_Base_F"
>>
"Components"
>>
"TransportPylonsComponent"
>>  
"pylons"
) [[apply]] {[[configName]] _x};
hint str _allPylons;
/* return:
[
"pylon1",
"pylon2",
"pylon3",
"pylon4",
"pylonBayRight1",
"pylonBayLeft1",
"pylonBayCenter1",
"pylonBayCenter2",
"pylonBayCenter3",
"pylonBayCenter4",
"pylonBayCenter5",
"pylonBayCenter6"
]*/</code> |= Example 3
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 23:22, 13 June 2017


-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 1.71|1.71]]
Hover & click on the images for description

Description

Description:
Get array of compatible pylon magazines
Groups:
Uncategorised

Syntax

Syntax:
vehicle getCompatiblePylonMagazines pylon
Parameters:
vehicle: Object - aircraft object
pylon: Number - pylon id or String - pylon class name from TransportPylonsComponent >> pylons class (see Example 4). 0 or "" to return all compatible magazines from all pylons
Return Value:
Array

Alternative Syntax

Syntax:
vehicleClass getCompatiblePylonMagazines pylon
Parameters:
vehicleClass: String - aircraft config class
pylon: Number - pylon id or String - pylon class name from TransportPylonsComponent >> pylons class (see Example 4). 0 or "" to return all compatible magazines from all pylons
Return Value:
Array

Examples

Example 1:
vehicle player getCompatiblePylonMagazines 0; // returns array of arrays containing all compatible magazines
Example 2:
"Plane_Fighter_01_Base_F" getCompatiblePylonMagazines 3; // returns array of compatible magazines for the 3rd pylon
Example 3:
jet1 getCompatiblePylonMagazines "pylon1"; // returns array of compatible magazines for the 1st pylon
Example 4:
Get all pylon names for "Plane_Fighter_01_Base_F" private _allPylons = "true" configClasses ( configFile >> "CfgVehicles" >> "Plane_Fighter_01_Base_F" >> "Components" >> "TransportPylonsComponent" >> "pylons" ) apply {configName _x}; hint str _allPylons; /* return: [ "pylon1", "pylon2", "pylon3", "pylon4", "pylonBayRight1", "pylonBayLeft1", "pylonBayCenter1", "pylonBayCenter2", "pylonBayCenter3", "pylonBayCenter4", "pylonBayCenter5", "pylonBayCenter6" ]*/

Additional Information

See also:
See also needed

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

[[Category:Introduced with arma3dev version 1.71]][[ Category: arma3dev: New Scripting Commands | GETCOMPATIBLEPYLONMAGAZINES]][[ Category: arma3dev: Scripting Commands | GETCOMPATIBLEPYLONMAGAZINES]]

Notes

Bottom Section