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

ObjAtLayer

Returns the serial (ID) of the item equipped on the specified layer of the player’s own character.

LayerType — the layer index (see ConstantsAndEnums). Helper methods that return layer values are documented separately in Layers. If 0, returns 0 immediately.

Returns 0 if no item is equipped on the specified layer.

This is a shortcut for ObjAtLayerEx(LayerType, Self). To check equipment on another mobile, use ObjAtLayerEx.

Возвращает серийный номер (ID) предмета, экипированного в указанном слое собственного персонажа.

LayerType — индекс слоя (см. ConstantsAndEnums). Вспомогательные методы, возвращающие значения слоёв, вынесены на отдельную страницу: Layers. Если 0, сразу возвращает 0.

Возвращает 0, если на указанном слое нет экипированного предмета.

Это сокращение для ObjAtLayerEx(LayerType, Self). Для проверки экипировки другого мобайла используйте ObjAtLayerEx.

Pascal

function ObjAtLayer(LayerType: Byte): Cardinal;

Python

def ObjAtLayer(layer: int) -> int: ...

Pascal Example

begin
  if ObjAtLayer(RhandLayer) <> 0 then
    AddToSystemJournal('Right hand: $' + IntToHex(ObjAtLayer(RhandLayer), 8))
  else
    AddToSystemJournal('Right hand is empty');
end.

Python Example

if ObjAtLayer(RhandLayer()) != 0:
    AddToSystemJournal(f'Right hand: ${ObjAtLayer(RhandLayer()):08X}')
else:
    AddToSystemJournal('Right hand is empty')

See Also

ObjAtLayerEx, Equip, GetLayer, ConstantsAndEnums, Layers