ThingCount

From Eternity Wiki
Revision as of 05:37, 4 October 2026 by Printz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description[edit]

This is an ACS built-in function.

Counts the number of things of given spawn ID.

Usage[edit]

int ThingCount(int type, int tid)

Parameters[edit]

  • type: ACS spawn ID of things to count. If T_NONE (0), it will count all things, which may be filtered by tid.
  • tid: optional TID to filter by, if nonzero.

Return value[edit]

The number of things by that criteria.

Examples[edit]

No examples given.

Notes[edit]

In case of monsters with the COUNTKILL or KILLABLE flag, it will only count them if they are alive. Dead monsters will not be counted; they don't have to be completely removed from the map, corpses won't be counted.

This function's identification in zspecial.acs is: ACC internal.

See also[edit]