All help topics · Link to this topic
Showing help on 'occupants()'
Syntax: occupants(LIST <objects> [, OBJ | LIST <parent>, INT <player flag set?>, INT <inverse>]) => LISTIterates through the list of <objects> and returns those matching a specific set of criteria:
- If only <objects> is specified, the occupants function will return a list of objects with the player flag set.
- If the <parent> argument is specified, a list of <objects> descending from <parent> will be returned. If <parent> is a list, <object> must descend from at least one object in the list.
- If both <parent> and <player flag set> are specified, occupants will check both that an object is descended from <parent> and also has the player flag set.
- If the inverse-match is 0 (default behavior). If it is 1, then inverse the match to 'items in the list that do NOT match the parent(s)'
Raises E_TYPE if <parent> is provided and is not an object or list of objects. Raises E_INVARG if <objects> is not a valid list of objects.
As of ToastStunt 2.8.0, this is not a threaded function.