unlinkItem: Difference between revisions

From Bohemia Interactive Community
m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>")
m (Some wiki formatting)
 
Line 10: Line 10:
|gr1= Unit Inventory
|gr1= Unit Inventory


|descr= Unassign and delete existing item from its assigned slot. If item does not exist or is not in the assigned slot, command simply fails. See also [[unassignItem]].
|descr= Unassign and delete existing item from its assigned slot. Nothing happens if the item does not exist or is not assigned. See also [[unassignItem]].


|s1= unit [[unlinkItem]] item
|s1= unit [[unlinkItem]] item
Line 23: Line 23:
bluforUnit unlinkItem "NVGoggles";
bluforUnit unlinkItem "NVGoggles";
opforUnit unlinkItem "NVGoggles_OPFOR";
opforUnit unlinkItem "NVGoggles_OPFOR";
independentUnit unlinkItem "NVGoggles_INDEP";
indepUnit unlinkItem "NVGoggles_INDEP";
 
// or
{ _x unlinkItem hmd _x } forEach [bluforUnit, opforUnit, indepUnit];
</sqf>
</sqf>


Line 29: Line 32:
}}
}}


<dl class="command_description">
{{Note
 
|user= Killzone_Kid
<dt></dt>
|timestamp= 20181015144600
<dd class="notedate">Posted on 2018-10-15 - 14:46 (UTC)</dd>
|text= With this command you can also unlink [[vest]], [[uniform]] and [[headgear]].
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt>
}}
<dd class="note">
With this command you can also unlink [[vest]], [[uniform]] and [[headgear]]
</dd>
 
</dl>

Latest revision as of 15:01, 31 March 2026

Hover & click on the images for description

Description

Description:
Unassign and delete existing item from its assigned slot. Nothing happens if the item does not exist or is not assigned. See also unassignItem.
Groups:
Unit Inventory

Syntax

Syntax:
unit unlinkItem item
Parameters:
unit: Object
item: String
Return Value:
Nothing

Examples

Example 1:
bluforUnit unlinkItem "NVGoggles"; opforUnit unlinkItem "NVGoggles_OPFOR"; indepUnit unlinkItem "NVGoggles_INDEP"; // or { _x unlinkItem hmd _x } forEach [bluforUnit, opforUnit, indepUnit];

Additional Information

See also:
linkItem addItem assignItem removeItem unassignItem assignedItems removeAllAssignedItems

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note
Killzone_Kid - c
Posted on Oct 15, 2018 - 14:46 (UTC)
With this command you can also unlink vest, uniform and headgear.