unassignItem: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "| Nothing |x1=" to "|r1= Nothing |x1=")
m (Text replacement - " +" to " ")
Line 30: Line 30:
   _x [[unassignItem]] [[hmd]] [[Magic Variables#x|_x]]; {{cc|Unassign (not remove) NVGs from all units. The class name of the NVG is not needed}}
   _x [[unassignItem]] [[hmd]] [[Magic Variables#x|_x]]; {{cc|Unassign (not remove) NVGs from all units. The class name of the NVG is not needed}}
} [[forEach]] [[allUnits]];</code>
} [[forEach]] [[allUnits]];</code>


|seealso= [[assignItem]], [[addItem]], [[removeItem]], [[linkItem]], [[unlinkItem]], [[assignedItems]], [[removeAllAssignedItems]]
|seealso= [[assignItem]], [[addItem]], [[removeItem]], [[linkItem]], [[unlinkItem]], [[assignedItems]], [[removeAllAssignedItems]]
}}
}}


{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}

Revision as of 09:26, 11 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Unit Inventory

Syntax

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

Examples

Example 1:
_bluforUnit unassignItem "NVGoggles"; _bluforUnit removeItem "NVGoggles"; _opforUnit unassignItem "NVGoggles_OPFOR"; _opforUnit removeItem "NVGoggles_OPFOR"; _independentUnit unassignItem "NVGoggles_INDEP"; _independentUnit removeItem "NVGoggles_INDEP";
Example 2:
{ _x unassignItem hmd _x; // Unassign (not remove) NVGs from all units. The class name of the NVG is not needed } forEach allUnits;

Additional Information

See also:
assignItemaddItemremoveItemlinkItemunlinkItemassignedItemsremoveAllAssignedItems

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