getCompatiblePylonMagazines: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{GameCategory\|(arma[0123])\|New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{DISPLAYTITLE:getCompatiblePylonMagazines}}
{{DISPLAYTITLE:getCompatiblePylonMagazines}}
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
| arma3 |Game name=
Line 8: Line 7:


|gr1= Vehicle Loadouts |GROUP1=
|gr1= Vehicle Loadouts |GROUP1=
____________________________________________________________________________________________


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


|s1= vehicle '''getCompatiblePylonMagazines''' pylon|
|s1= vehicle '''getCompatiblePylonMagazines''' pylon|
Line 26: Line 23:


| r2=[[Array]] |
| r2=[[Array]] |
____________________________________________________________________________________________
   
   
|x1= <code>[[vehicle]] [[player]] [[getCompatiblePylonMagazines]] 0; // returns array of arrays containing all compatible magazines</code> |EXAMPLE1
|x1= <code>[[vehicle]] [[player]] [[getCompatiblePylonMagazines]] 0; // returns array of arrays containing all compatible magazines</code> |EXAMPLE1
Line 61: Line 57:
"pylonBayCenter6"
"pylonBayCenter6"
]*/</code> |EXAMPLE3
]*/</code> |EXAMPLE3
____________________________________________________________________________________________


|seealso=[[Arma 3 Vehicle Loadouts]],[[getPylonMagazines]],[[setAmmoOnPylon]],[[ammoOnPylon]],[[animatePylon]],[[animateBay]],[[setPylonsPriority]],[[setPylonLoadout]]
|seealso=[[Arma 3 Vehicle Loadouts]],[[getPylonMagazines]],[[setAmmoOnPylon]],[[ammoOnPylon]],[[animatePylon]],[[animateBay]],[[setPylonsPriority]],[[setPylonLoadout]]

Revision as of 02:23, 17 January 2021


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 - 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
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:
Arma 3 Vehicle LoadoutsgetPylonMagazinessetAmmoOnPylonammoOnPylonanimatePylonanimateBaysetPylonsPrioritysetPylonLoadout

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

Notes

Bottom Section