removeAllAssignedItems: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>\[\[([a-zA-Z0-9_]+)\]\] +\[\[([a-zA-Z0-9_]+)\]\];?<\/code>" to "<sqf>$1 $2;</sqf>") |
Lou Montana (talk | contribs) m (Text replacement - "since= Arma3" to "since= arma3") |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 11: | Line 11: | ||
|descr= Unassigns and deletes all linked items from inventory. | |descr= Unassigns and deletes all linked items from inventory. | ||
The commands operates on [[assignedItems]] array, which does not include goggles or headgear.<br> | The commands operates on [[assignedItems]] array, which does not include goggles or headgear but includes binoculars, which is a weapon.<br> | ||
Use [[removeGoggles]] and [[removeHeadgear]] for those. | Use [[removeGoggles]] and [[removeHeadgear]] for those. | ||
Line 19: | Line 19: | ||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|s2= [[removeAllAssignedItems]] [unit, allItems, includeBinocs] | |||
|s2since= arma3 2.14 | |||
|p21= unit: [[Object]] - soldier | |||
|p22= allItems: [[Boolean]] - [[true]] to include all slot items, [[false]] exclude goggles and headgear | |||
|p23= includeBinocs: [[Boolean]] - [[true]] to include binoculars (which is a weapon), [[false]] to exclude it | |||
|r2= [[Nothing]] | |||
|x1= <sqf>removeAllAssignedItems player;</sqf> | |x1= <sqf>removeAllAssignedItems player;</sqf> |
Latest revision as of 16:26, 9 February 2024
Description
- Description:
- Unassigns and deletes all linked items from inventory.
The commands operates on assignedItems array, which does not include goggles or headgear but includes binoculars, which is a weapon.
Use removeGoggles and removeHeadgear for those. - Groups:
- Unit Inventory
Syntax
- Syntax:
- removeAllAssignedItems unit
- Parameters:
- unit: Object
- Return Value:
- Nothing
Alternative Syntax
- Syntax:
- removeAllAssignedItems [unit, allItems, includeBinocs]
- Parameters:
- unit: Object - soldier
- allItems: Boolean - true to include all slot items, false exclude goggles and headgear
- includeBinocs: Boolean - true to include binoculars (which is a weapon), false to exclude it
- Return Value:
- Nothing
Examples
- Example 1:
- removeAllAssignedItems player;
Additional Information
- See also:
- assignedItems linkItem unlinkItem assignItem unassignItem addItem removeItem removeAllContainers
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