getCompatiblePylonMagazines: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Category:Pages using duplicate arguments in template calls)
m (Some wiki formatting)
 
(35 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:getCompatiblePylonMagazines}}
{{RV|type=command
{{Command|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.72


| 1.72 |Game version=
|gr1= Vehicle Loadouts
____________________________________________________________________________________________


| Get array of compatible pylon magazines|DESCRIPTION=
|descr= Get array of compatible pylon magazines
____________________________________________________________________________________________


|s1= vehicle '''getCompatiblePylonMagazines''' pylon|
|s1= vehicle [[getCompatiblePylonMagazines]] pylon


|p1 = vehicle: [[Object]] - aircraft object|
|p1= vehicle: [[Object]] or [[String]] - aircraft object or config class
|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|


|r1= [[Array]] |
|p2= pylon: [[Number]] or [[String]]
* If [[String]] - pylon class name from {{hl|TransportPylonsComponent &gt;&gt; pylons}} class
* If [[Number]] - pylon ID
* If an invalid pylon ID or class name is provided, such as 0 or "", all compatible magazines from all pylons are returned.


| s2=vehicleClass '''getCompatiblePylonMagazines''' pylon|
|r1= [[Array]] of [[String]]s, or [[Array]] of [[Array]] of [[String]]s


|p21 = vehicleClass: [[String]] - aircraft config class|
|x1= <sqf>
|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|
// returns array of arrays containing all compatible magazines
vehicle player getCompatiblePylonMagazines 0;
</sqf>


| r2=[[Array]] |
|x2= <sqf>
____________________________________________________________________________________________
// returns array of compatible magazines for the 3rd pylon if it exists; otherwise returns array of arrays (see above)
 
jet1 getCompatiblePylonMagazines 3;
|x1= <code>[[vehicle]] [[player]] [[getCompatiblePylonMagazines]] 0; // returns array of arrays containing all compatible magazines</code> |EXAMPLE1
</sqf>
|x2= <code>"Plane_Fighter_01_Base_F" [[getCompatiblePylonMagazines]] 3; // returns array of compatible magazines for the 3rd pylon</code> |EXAMPLE2
|x3= <code>jet1 [[getCompatiblePylonMagazines]] "pylon1"; // returns array of compatible magazines for the 1st pylon</code> |EXAMPLE3
|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> |EXAMPLE3
____________________________________________________________________________________________


|seealso=[[Arma 3 Vehicle Loadouts]],[[getPylonMagazines]],[[setAmmoOnPylon]],[[ammoOnPylon]],[[animatePylon]],[[animateBay]],[[setPylonsPriority]],[[setPylonLoadout]]
|x3= <sqf>
// returns array of compatible magazines for "pylon1" class, defined in
// configFile >> "CfgVehicles" >> "B_Plane_CAS_01_dynamicLoadout_F" >> "Components" >> "TransportPylonsComponent" >> "Pylons"
"B_Plane_CAS_01_dynamicLoadout_F" getCompatiblePylonMagazines "pylon1";
</sqf>


|seealso= [[Arma 3: Vehicle Loadouts]] [[getPylonMagazines]] [[setAmmoOnPylon]] [[ammoOnPylon]] [[animatePylon]] [[animateBay]] [[setPylonsPriority]] [[setPylonLoadout]]
}}
}}
<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:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Vehicle Loadouts|{{uc:{{PAGENAME}}}}]]

Latest revision as of 21:43, 7 May 2022

Hover & click on the images for description

Description

Description:
Get array of compatible pylon magazines
Groups:
Vehicle Loadouts

Syntax

Syntax:
vehicle getCompatiblePylonMagazines pylon
Parameters:
vehicle: Object or String - aircraft object or config class
pylon: Number or String
  • If String - pylon class name from TransportPylonsComponent >> pylons class
  • If Number - pylon ID
  • If an invalid pylon ID or class name is provided, such as 0 or "", all compatible magazines from all pylons are returned.
Return Value:
Array of Strings, or Array of Array of Strings

Examples

Example 1:
// returns array of arrays containing all compatible magazines vehicle player getCompatiblePylonMagazines 0;
Example 2:
// returns array of compatible magazines for the 3rd pylon if it exists; otherwise returns array of arrays (see above) jet1 getCompatiblePylonMagazines 3;
Example 3:
// returns array of compatible magazines for "pylon1" class, defined in // configFile >> "CfgVehicles" >> "B_Plane_CAS_01_dynamicLoadout_F" >> "Components" >> "TransportPylonsComponent" >> "Pylons" "B_Plane_CAS_01_dynamicLoadout_F" getCompatiblePylonMagazines "pylon1";

Additional Information

See also:
Arma 3: Vehicle Loadouts getPylonMagazines setAmmoOnPylon ammoOnPylon animatePylon animateBay setPylonsPriority setPylonLoadout

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