magazinesAllTurrets: Difference between revisions
BrettMayson (talk | contribs) mNo edit summary |
BrettMayson (talk | contribs) mNo edit summary |
||
| Line 16: | Line 16: | ||
|r1= [[Array]] of [[Array]]s with [className, turretPath, ammoCount, id, creator]: | |r1= [[Array]] of [[Array]]s with [className, turretPath, ammoCount, id, creator]: | ||
* className: [[String]] - magazine class name | * className: [[String]] - magazine class name | ||
* turretPath: | * turretPath: [[Turret Path]] | ||
* ammoCount: [[Number]] - how many rounds left in the magazine | * ammoCount: [[Number]] - how many rounds left in the magazine | ||
* id: [[Number]] - id of the magazine object. The number starts at 10,000,000. This gives it about 6,700,000 possible ids before the number starts losing precision and cannot be used in scripts. | * id: [[Number]] - id of the magazine object. The number starts at 10,000,000. This gives it about 6,700,000 possible ids before the number starts losing precision and cannot be used in scripts. | ||
| Line 31: | Line 31: | ||
|r2= [[Array]] of [[Array]]s with [className, turretPath, ammoCount, id, creator]: | |r2= [[Array]] of [[Array]]s with [className, turretPath, ammoCount, id, creator]: | ||
* className: [[String]] - magazine class name | * className: [[String]] - magazine class name | ||
* turretPath: | * turretPath: [[Turret Path]] | ||
* ammoCount: [[Number]] - how many rounds left in the magazine | * ammoCount: [[Number]] - how many rounds left in the magazine | ||
* id: [[Number]] - id of the magazine object. The number starts at 10,000,000. This gives it about 6,700,000 possible ids before the number starts losing precision and cannot be used in scripts. | * id: [[Number]] - id of the magazine object. The number starts at 10,000,000. This gives it about 6,700,000 possible ids before the number starts losing precision and cannot be used in scripts. | ||
Revision as of 07:48, 2 January 2026
Description
- Description:
- Returns all magazines (including empty) from all vehicle turrets (including driver turret [-1]) and their ammo counts. Since Arma 3 v2.08.148327 it is possible to exclude person turrets from returned results.
- Groups:
- Turrets
Syntax
- Syntax:
- magazinesAllTurrets vehicle
- Parameters:
- vehicle: Object - vehicle with turrets
- Return Value:
- Array of Arrays with [className, turretPath, ammoCount, id, creator]:
- className: String - magazine class name
- turretPath: Turret Path
- ammoCount: Number - how many rounds left in the magazine
- id: Number - id of the magazine object. The number starts at 10,000,000. This gives it about 6,700,000 possible ids before the number starts losing precision and cannot be used in scripts.
- creator: Number - owner / clientOwner of the PC that created the object
Alternative Syntax
- Syntax:
- magazinesAllTurrets [vehicle, excludePersonTurrets]
- Parameters:
- vehicle: Object - vehicle with turrets
- excludePersonTurrets: Boolean - when true only vehicle's turrets are queried
- Return Value:
- Array of Arrays with [className, turretPath, ammoCount, id, creator]:
- className: String - magazine class name
- turretPath: Turret Path
- ammoCount: Number - how many rounds left in the magazine
- id: Number - id of the magazine object. The number starts at 10,000,000. This gives it about 6,700,000 possible ids before the number starts losing precision and cannot be used in scripts.
- creator: Number - owner / clientOwner of the PC that created the object
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- magazinesTurret allTurrets addMagazineTurret removeMagazinesTurret removeMagazineTurret weaponsTurret loadMagazine magazines magazinesDetail magazinesAmmo magazinesAmmoFull addWeaponTurret removeWeaponTurret turretLocal getPylonMagazines ammoOnPylon
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note