magazinesAllTurrets: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
BrettMayson (talk | contribs) mNo edit summary |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 16: | Line 16: | ||
|r1= [[Array]] - in the following format: [<nowiki/>[className, turretPath, ammoCount, id, creator],...] where: | |r1= [[Array]] - in the following format: [<nowiki/>[className, turretPath, ammoCount, id, creator],...] where: | ||
* className: [[String]] - magazine class name | * className: [[String]] - magazine class name | ||
* turretPath: [[Array]] | * turretPath: [[Array]] format [[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 | * 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 | * creator: [[Number]] - [[owner]] / [[clientOwner]] of the PC that created the object | ||
|s2= [[magazinesAllTurrets]] [vehicle, | |s2= [[magazinesAllTurrets]] [vehicle, excludePersonTurrets] | ||
|s2since= arma3 2.08 | |s2since= arma3 2.08 | ||
Line 27: | Line 27: | ||
|p21= vehicle: [[Object]] - vehicle with turrets | |p21= vehicle: [[Object]] - vehicle with turrets | ||
|p22= excludePersonTurrets: [[ | |p22= excludePersonTurrets: [[Boolean]] - when [[true]] only vehicle's turrets are queried | ||
|r2= [[Array]] - in the following format: [<nowiki/>[className, turretPath, ammoCount, id, creator],...] where: | |r2= [[Array]] - in the following format: [<nowiki/>[className, turretPath, ammoCount, id, creator],...] where: | ||
* className: [[String]] - magazine class name | * className: [[String]] - magazine class name | ||
* turretPath: [[Array]] | * turretPath: [[Array]] format [[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 | * 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 | * creator: [[Number]] - [[owner]] / [[clientOwner]] of the PC that created the object | ||
|x1= < | |x1= <sqf>_mags = magazinesAllTurrets vehicle player;</sqf> | ||
|x2= < | |x2= <sqf>_mags = magazinesAllTurrets [vehicle player, true];</sqf> | ||
|seealso= [[magazinesTurret]] [[allTurrets]] [[addMagazineTurret]] [[removeMagazinesTurret]] [[removeMagazineTurret]] [[weaponsTurret]] [[loadMagazine]] [[magazines]] [[magazinesDetail]] [[magazinesAmmo]] [[magazinesAmmoFull]] [[addWeaponTurret]] | |seealso= [[magazinesTurret]] [[allTurrets]] [[addMagazineTurret]] [[removeMagazinesTurret]] [[removeMagazineTurret]] [[weaponsTurret]] [[loadMagazine]] [[magazines]] [[magazinesDetail]] [[magazinesAmmo]] [[magazinesAmmoFull]] [[addWeaponTurret]] [[removeWeaponTurret]] [[turretLocal]] [[getPylonMagazines]] [[ammoOnPylon]] | ||
}} | }} |
Latest revision as of 05:00, 27 November 2023
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 - in the following format: [[className, turretPath, ammoCount, id, creator],...] where:
- className: String - magazine class name
- turretPath: Array format 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 - in the following format: [[className, turretPath, ammoCount, id, creator],...] where:
- className: String - magazine class name
- turretPath: Array format 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 or on the Forums.
Only post proven facts here! Add Note