POLPOX
Before Arma 3 v2.02: turret must be [] if you wanted to equip the magazine to the pilot. [-1] returns false and fails unlike other turret-related commands.
Results appear below as you type; use the arrow keys to move through them.
Command · Markdown · JSON · original wiki page
Adds/overrides loadout to a vehicle pylon. TransportPylonsComponent in vehicle config and pylonWeapon in the magazine config are required to run.
Note
This command also adds the corresponding weapon if the vehicle does not have one, but will not remove one that is no longer used.
vehicle setPylonLoadout [pylon, magazine, forced, turret]
Parameters:
vehicle: Objectpylon: Number or String - pylon index (index starts from 1) or pylon name (see Example 1)magazine: String - magazine nameforced: Boolean - (Optional, default false) true to force an incompatible magazineturret: Turret Path - (Optional, default []) turret pathReturns: Boolean - true on success
vehicle player setPylonLoadout ["pylon1", ""];
Make all of your pylon weapons Twin Cannon 30 mm:
private _vehicle = vehicle player;
private _pylonsIndices = getAllPylonsInfo _vehicle apply { _x select 0 };
{
_vehicle setPylonLoadout [_x, "PylonWeapon_300Rnd_20mm_shells", true];
} forEach _pylonsIndices;
Showcase all possible magazines:
0 spawn {
private _allPylonMagazines = "getText (_x >> 'pylonWeapon') != ''" configClasses (configFile >> "CfgMagazines");
private _vehicle = vehicle player;
private _pylonsIndices = getAllPylonsInfo _vehicle apply { _x select 0 };
{
private _configName = configName _x;
{
_vehicle setPylonLoadout [_x, _configName, true];
} forEach _pylonsIndices;
hint _configName;
sleep 1.5;
} forEach _allPylonMagazines;
};
MP compatible usage:
[myPlane, [1, "PylonWeapon_300Rnd_20mm_shells", true]] remoteExec ["setPylonLoadout", myPlane];
Important
This command should run locally to the vehicle itself or it will cause desync issue! (especially upon the locality change, e.g getting in the vehicle). See Example 4 for an MP-compatible usage.
Arma 3: Vehicle Loadouts · getCompatiblePylonMagazines · getPylonMagazines · setAmmoOnPylon · ammoOnPylon · animatePylon · animateBay · setPylonsPriority
Before Arma 3 v2.02: turret must be [] if you wanted to equip the magazine to the pilot. [-1] returns false and fails unlike other turret-related commands.