itemsWithMagazines: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) mNo edit summary |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(41 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| arma3 |= | |game1= arma3 | ||
|version1= 1.04 | |||
|arg= global | |||
| | |gr1= Unit Inventory | ||
| Returns combined array including all unit's [[items]] and all unit's [[magazines]]. Loaded magazines such as [[currentMagazine]], [[primaryWeaponMagazine]], [[secondaryWeaponMagazine]], [[handgunMagazine]] as well as [[assignedItems]] are excluded. | |descr= 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. | ||
| | |s1= [[itemsWithMagazines]] unit | ||
|p1= unit: [[Object]] |= | |p1= unit: [[Object]] | ||
|r1= [[Array]] | |||
|x1= <sqf> | |||
|x1= < | private _res1 = itemsWithMagazines player; | ||
//is essentially the same as | // ... is essentially the same as ... | ||
private _res2 = items player + magazines player; | |||
</sqf> | |||
< | Example result: | ||
<sqf> | |||
[ | |||
"FirstAidKit", //item | "FirstAidKit", //item | ||
"30Rnd_65x39_caseless_mag", //magazine | "30Rnd_65x39_caseless_mag", //magazine | ||
Line 26: | Line 27: | ||
"Chemlight_green", //magazine | "Chemlight_green", //magazine | ||
"HandGrenade", //magazine | "HandGrenade", //magazine | ||
"ToolKit", | "ToolKit", //item | ||
"MineDetector" //item | "MineDetector" //item | ||
]</ | ] | ||
</sqf> | |||
| [[removeAllItemsWithMagazines]] | |seealso= [[items]] [[removeAllItemsWithMagazines]] [[backpacks]] | ||
}} | }} | ||
Latest revision as of 19:43, 3 September 2024
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:
- Example result:[ "FirstAidKit", //item "30Rnd_65x39_caseless_mag", //magazine "16Rnd_9x21_Mag", //magazine "Chemlight_green", //magazine "HandGrenade", //magazine "ToolKit", //item "MineDetector" //item ]
Additional Information
- See also:
- items removeAllItemsWithMagazines backpacks
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