magazinesAllTurrets: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " |r1=[[" to " |r1= [[") |
Killzone Kid (talk | contribs) No edit summary |
||
Line 8: | Line 8: | ||
|gr1= Turrets | |gr1= Turrets | ||
|descr= Returns all magazines (including empty) from all vehicle turrets (including driver turret [-1]) and their ammo counts. | |descr= 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. | ||
|s1= [[magazinesAllTurrets]] vehicle | |s1= [[magazinesAllTurrets]] vehicle | ||
Line 15: | Line 15: | ||
|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 | |||
* turretPath: [[Array]] - 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 7,600,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 | |||
|s2= [[magazinesAllTurrets]] [vehicle, exludePersonTurrets] | |||
|s2since= arma3 2.08 | |||
|p21= vehicle: [[Object]] - vehicle with turrets | |||
|p22= excludePersonTurrets: [[Bool]] - when [[true]] only vehicle's turrets are queried | |||
|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]] - turret path | * turretPath: [[Array]] - turret path | ||
Line 22: | Line 37: | ||
|x1= <code>_mags = [[magazinesAllTurrets]] [[vehicle]] [[player]];</code> | |x1= <code>_mags = [[magazinesAllTurrets]] [[vehicle]] [[player]];</code> | ||
|x2= <code>_mags = [[magazinesAllTurrets]] <nowiki>[</nowiki>[[vehicle]] [[player]], [[true]]];</code> | |||
|seealso= [[magazinesTurret]], [[allTurrets]], [[addMagazineTurret]], [[removeMagazinesTurret]], [[removeMagazineTurret]], [[weaponsTurret]], [[loadMagazine]], [[magazines]], [[magazinesDetail]], [[magazinesAmmo]], [[magazinesAmmoFull]], [[addWeaponTurret]], [[removeWeaponTurret]], [[turretLocal]], [[getPylonMagazines]], [[ammoOnPylon]] | |seealso= [[magazinesTurret]], [[allTurrets]], [[addMagazineTurret]], [[removeMagazinesTurret]], [[removeMagazineTurret]], [[weaponsTurret]], [[loadMagazine]], [[magazines]], [[magazinesDetail]], [[magazinesAmmo]], [[magazinesAmmoFull]], [[addWeaponTurret]], [[removeWeaponTurret]], [[turretLocal]], [[getPylonMagazines]], [[ammoOnPylon]] | ||
}} | }} |
Revision as of 12:42, 10 October 2021
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 - 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 7,600,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, exludePersonTurrets]
- Parameters:
- vehicle: Object - vehicle with turrets
- excludePersonTurrets: Bool - 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 - 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 7,600,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:
_mags = magazinesAllTurrets vehicle player;
- Example 2:
_mags = magazinesAllTurrets [vehicle player, true];
Additional Information
- See also:
- magazinesTurretallTurretsaddMagazineTurretremoveMagazinesTurretremoveMagazineTurretweaponsTurretloadMagazinemagazinesmagazinesDetailmagazinesAmmomagazinesAmmoFulladdWeaponTurretremoveWeaponTurretturretLocalgetPylonMagazinesammoOnPylon
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