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

GetLayerCount

Returns the number of static layers at the given map position (X, Y) in world WorldNum.

Deprecated: This method internally calls ReadStaticsXY to get the static count. It is recommended to call ReadStaticsXY directly and check the StaticCount field instead.

Возвращает количество статических слоёв в указанной позиции карты (X, Y) в мире WorldNum.

Устаревший: Метод внутри вызывает ReadStaticsXY. Рекомендуется вызывать ReadStaticsXY напрямую и проверять поле StaticCount.

Pascal

function GetLayerCount(X: Word; Y: Word; WorldNum: Byte): Byte;

Python

def GetLayerCount(X: int, Y: int, WorldNum: int) -> int: ...

Pascal Example

begin
  AddToSystemJournal('Layers: ' + IntToStr(GetLayerCount(1000, 1000, WorldNum)));
end.

Python Example

AddToSystemJournal(f'Layers: {GetLayerCount(1000, 1000, WorldNum())}')

See Also

ReadStaticsXY