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

GetDirection

Returns the facing direction (0–7) of the mobile with ObjID.

See Directions for direction values.

Note: A value of 0 (North) can be either a real direction or the default value for a disconnected/unknown character.

Возвращает направление (0–7), в котором обращён мобайл с ObjID.

См. Directions для значений направлений.

Примечание: Значение 0 (North) может быть как реальным направлением, так и значением по умолчанию для неподключённого/неизвестного персонажа.

Pascal

function GetDirection(ObjID: Cardinal): Byte;

Parameters:

  • ObjID — ID of the mobile.

Python

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

Pascal Example

begin
  AddToSystemJournal('My direction: ' + IntToStr(GetDirection(Self)));
end.

Python Example

AddToSystemJournal(f'My direction: {GetDirection(Self())}')

See Also

GetX, GetY, CalcDir, Directions