Skip to content

KcdMp.count

How many entities of a class the level holds.

KcdMp.count(cls)
Parameter Type
cls string an entity class name ("NPC", "Horse", "AnimDoor", "Stash" …)

number - 0 when none or the class is unknown

System.LogAlways("[KcdMp] doors: " .. KcdMp.count("AnimDoor"))

KcdMp.census · the Helpers group of the index