Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Unequip

Removes an item from the specified equipment layer and places it into the backpack.

Layer — equipment layer index. See ConstantsAndEnums for layer values. Helper methods that return layer values are documented separately in Layers.

Returns True if the item was successfully unequipped, False if the layer is empty or the operation failed.

In Python, this method is named UnEquip.

Снимает предмет с указанного слоя экипировки и помещает его в рюкзак.

Layer — индекс слоя экипировки. См. ConstantsAndEnums для значений слоёв. Вспомогательные методы, возвращающие значения слоёв, вынесены на отдельную страницу: Layers.

Возвращает True, если предмет успешно снят, False — если слой пуст или операция не удалась.

В Python метод называется UnEquip.

Pascal

function Unequip(Layer: Byte): Boolean;

Python

def UnEquip(layer: int) -> bool: ...

Pascal Example

begin
  // Unequip weapon from right hand (layer 1)
  if Unequip(RhandLayer) then
    AddToSystemJournal('Weapon unequipped')
  else
    AddToSystemJournal('Nothing in right hand');
end.

Python Example

# Unequip weapon from right hand (layer 1)
if UnEquip(Layer.RhandLayer):
    AddToSystemJournal('Weapon unequipped')
else:
    AddToSystemJournal('Nothing in right hand')

See Also

Equip, Equipt, UnequipItems, GetEquipment, ConstantsAndEnums, Layers