{"name":"unassignItem","title":"unassignItem","type":"command","url":"https://community.bistudio.com/wiki/unassignItem","revid":353052,"updated":"2024-03-12T12:31:28Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"0.50"},"since":"arma3 0.50","arma3_since":"0.50","locality":{"argument":"global","effect":"global"},"description":"Unassigns existing item and tries to put it into inventory. If there is no space in inventory the item simply disappears. See also unlinkItem.","syntaxes":[{"syntax":"unit unassignItem item","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"item","type":"String","type_expr":"String"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"item"}}],"examples":[{"code":["_bluforUnit unassignItem \"NVGoggles\";\n_bluforUnit removeItem \"NVGoggles\";\n_opforUnit unassignItem \"NVGoggles_OPFOR\";\n_opforUnit removeItem \"NVGoggles_OPFOR\";\n_independentUnit unassignItem \"NVGoggles_INDEP\";\n_independentUnit removeItem \"NVGoggles_INDEP\";"]},{"text":"```sqf\n{\n    _x unassignItem hmd _x; // unassign (not remove) NVGs from all units\n} forEach allUnits;\n```","code":["{\n\t_x unassignItem hmd _x; // unassign (not remove) NVGs from all units\n} forEach allUnits;"]}],"see_also":["assignItem","addItem","removeItem","linkItem","unlinkItem","assignedItems","removeAllAssignedItems"]}