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

GetMultiPartsAtPosition

Returns all multi parts at the specified position (X, Y). Useful for checking what multi components exist at a specific tile inside a house or boat.

Returns an empty array if no multi is found at the position, UO data files are not loaded, or the character is disconnected.

Возвращает все части мульти-объекта в указанной позиции (X, Y). Полезно для проверки компонентов мульти на конкретном тайле внутри дома или лодки.

Возвращает пустой массив, если в данной позиции нет мульти-объекта, файлы UO Data не загружены, или персонаж не подключён.

Pascal

function GetMultiPartsAtPosition(X: Word; Y: Word): TMultiParts;

Type definition:

type
  TMultiPart = packed record
    Graphic: Word;
    X: Word;
    Y: Word;
    Z: ShortInt;
    Flag: Cardinal;
  end;

  TMultiParts = array of TMultiPart;

Python

def GetMultiPartsAtPosition(X: int, Y: int) -> list[MultiPart]: ...

Pascal Example

var
  Parts: TMultiParts;
begin
  Parts := GetMultiPartsAtPosition(SelfX, SelfY);
  AddToSystemJournal('Parts at position: ' + IntToStr(Length(Parts)));
end.

Python Example

parts = GetMultiPartsAtPosition(SelfX(), SelfY())
AddToSystemJournal(f'Parts at position: {len(parts)}')

See Also

GetMultiAllParts, GetMultis