Difference between revisions of "itemsWithMagazines"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "(\| * )+\}\}" to "}}")
m (Text replacement - " {3,}\|" to " |")
Line 13: Line 13:
 
|p1= unit: [[Object]]
 
|p1= unit: [[Object]]
 
| [[Array]]
 
| [[Array]]
 
  
 
|x1= <code>[[itemsWithMagazines]] [[player]]
 
|x1= <code>[[itemsWithMagazines]] [[player]]
Line 28: Line 27:
 
"MineDetector" //item
 
"MineDetector" //item
 
]</code>
 
]</code>
 
  
 
| [[items]], [[removeAllItemsWithMagazines]]
 
| [[items]], [[removeAllItemsWithMagazines]]

Revision as of 17:38, 18 January 2021

Hover & click on the images for description

Description

Description:
Returns combined array including all unit's stored items and all unit's stored magazines and all unit's stored weapons. Loaded magazines such as currentMagazine, primaryWeaponMagazine, secondaryWeaponMagazine, handgunMagazine, binocularMagazine as well as assignedItems are excluded.
Groups:
Unit Inventory

Syntax

Syntax:
itemsWithMagazines unit
Parameters:
unit: Object
Return Value:
Array

Examples

Example 1:
itemsWithMagazines player //is essentially the same as items player + magazines player [ "FirstAidKit", //item "30Rnd_65x39_caseless_mag", //magazine "16Rnd_9x21_Mag", //magazine "Chemlight_green", //magazine "HandGrenade", //magazine "ToolKit", //item "MineDetector" //item ]

Additional Information

See also:
itemsremoveAllItemsWithMagazines

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