CountEntities
How many entities of a class the level holds.
Syntax
Section titled “Syntax”CountEntities(cls)| Parameter | Type | |
|---|---|---|
cls |
string | an entity class name ("NPC", "Horse", "AnimDoor", "Stash" …) |
Returns
Section titled “Returns”number - 0 when none or the class is unknown
Example
Section titled “Example”print("doors: " .. CountEntities("AnimDoor"))See also
Section titled “See also”GetEntityCensus · the The player, the level and the frame group of the index
