setPylonLoadout: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Text replacement - "[] spawn" to "0 spawn") |
||
Line 45: | Line 45: | ||
|x3= Showcase all possible magazines: | |x3= Showcase all possible magazines: | ||
<sqf> | <sqf> | ||
0 spawn { | |||
private _allPylonMagazines = "getText (_x >> 'pylonWeapon') != ''" configClasses (configFile >> "CfgMagazines"); | private _allPylonMagazines = "getText (_x >> 'pylonWeapon') != ''" configClasses (configFile >> "CfgMagazines"); | ||
private _vehicle = vehicle player; | private _vehicle = vehicle player; |
Latest revision as of 21:24, 2 September 2024
Description
- Description:
- Adds/overrides loadout to a vehicle pylon. TransportPylonsComponent in vehicle config and pylonWeapon in the magazine config are required to run.
- Multiplayer:
- Groups:
- Vehicle Loadouts
Syntax
- Syntax:
- vehicle setPylonLoadout [pylon, magazine, forced, turret]
- Parameters:
- vehicle: Object
- pylon: Number or String - pylon index (index starts from 1) or pylon name (see Example 1)
- magazine: String - magazine name
- forced: Boolean - (Optional, default false) true to force an incompatible magazine
- turret: Array - (Optional, default c[]) turret path
- Return Value:
- Boolean - true on success
Examples
- Example 1:
- Example 2:
- Make all of your pylon weapons Twin Cannon 30 mm:
- Example 3:
- Showcase all possible magazines:
Copy0 spawn { private _allPylonMagazines = "getText (_x >> 'pylonWeapon') != ''" configClasses (configFile >> "CfgMagazines"); private _vehicle = vehicle player; private _pylonsIndices = getAllPylonsInfo _vehicle select { _x select 0 }; { private _configName = configName _x; { _vehicle setPylonLoadout [_x, _configName, true]; } forEach _pylonsIndices; hint _configName; sleep 1.5; } forEach _allPylonMagazines; };
- Example 4:
- MP compatible usage:
Additional Information
- See also:
- Arma 3: Vehicle Loadouts getCompatiblePylonMagazines getPylonMagazines setAmmoOnPylon ammoOnPylon animatePylon animateBay setPylonsPriority
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