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

GetX

Returns the X coordinate of the object or mobile with the given ObjID.

ObjID — ID of the object or mobile.

Returns 0 if the object does not exist or the character is disconnected.

Возвращает координату X объекта или мобила с указанным ObjID.

ObjID — ID объекта или мобила.

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

Pascal

function GetX(ObjID: Cardinal): Word;

Python

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

Pascal Example

begin
  AddToSystemJournal('My position: ' +
    IntToStr(GetX(Self)) + ', ' +
    IntToStr(GetY(Self)) + ', ' +
    IntToStr(GetZ(Self)));
end.

Python Example

AddToSystemJournal(f'My position: {GetX(Self())}, {GetY(Self())}, {GetZ(Self())}')

See Also

GetY, GetZ, GetDirection