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

IsContainer

Check if the object with ID ObjID is container or not.

NB: Evaluates on few parameters, like type, content, etc.

NB: Thats not a 100% warranty of correct result!

Pascal

function IsContainer(ObjID : Cardinal) : Boolean;

Python

def IsContainer(ObjID) -> boolean

Example Python

SetFindDistance(10)
SetFindVertical(10)
if FindType(-1, Ground()) > 0:
    for i in GetFoundList():
        if IsContainer(i):
            ClientPrintEx(i, 33, 1, "IsContainer")