removeAllAssignedItems: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(locality)
m (Text replacement - "since= Arma3" to "since= arma3")
 
(34 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 0.50


|0.50|= Game version
|arg= local


| arg= local |=
|eff= global
| eff= global |
____________________________________________________________________________________________


| Unassigns and deletes all linked items from inventory (map, compass, headgear, goggles etc.).  |= Description
|gr1= Unit Inventory
____________________________________________________________________________________________


| '''removeAllAssignedItems''' unit |= Syntax
|descr= 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.<br>
Use [[removeGoggles]] and [[removeHeadgear]] for those.


|p1= unit: [[Object]] |= PARAMETER1
|s1= [[removeAllAssignedItems]] unit


| [[Nothing]] |= RETURNVALUE
|p1= unit: [[Object]]


|r1= [[Nothing]]


|x1= <code>[[removeAllAssignedItems]] [[player]];</code>|= EXAMPLE1
|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


| [[assignedItems]], [[linkItem]], [[unlinkItem]], [[assignItem]], [[unassignItem]], [[addItem]], [[removeItem]], [[removeAllContainers]] |= SEEALSO
|r2= [[Nothing]]


| |= MPBEHAVIOUR
|x1= <sqf>removeAllAssignedItems player;</sqf>
____________________________________________________________________________________________
 
|seealso= [[assignedItems]] [[linkItem]] [[unlinkItem]] [[assignItem]] [[unassignItem]] [[addItem]] [[removeItem]] [[removeAllContainers]]
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 16:26, 9 February 2024

Hover & click on the images for description

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