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

GetParent

Returns the ID of the parent container for the object with ObjID.

Returns 0 if the character is disconnected, the item is not found, or the object has no parent (e.g. it is on the ground).

Возвращает ID родительского контейнера объекта с ObjID.

Возвращает 0, если персонаж не подключён, предмет не найден, или объект не имеет родителя (например, лежит на земле).

Pascal

function GetParent(ObjID: Cardinal): Cardinal;

Python

def GetParent(ObjID: int) -> int: ...

Pascal Example

begin
  if GetParent(FindItem) <> Backpack then
    AddToSystemJournal('Item is not in backpack');
end.

Python Example

if GetParent(FindItem()) != Backpack():
    AddToSystemJournal('Item is not in backpack')