Workshop.codes
Create

Array Count Where Last updated July 24, 2025

Description

Returns the number of elements in a specified array that satisfy a given condition, evaluated using the current array element value. Mirrors the filtering logic of Filtered Array but returns a count rather than the matching elements themselves. Useful for compact condition checks, threshold triggers, and summary statistics.

Snippet

Array Count Where(All Players(All Teams), Health Of(Current Array Element) < 50);

Properties

Returns: Number
Parameters: Array, Condition

Array
Type: Array, Default: Empty Array
The array whose elements will be evaluated.

Condition
Type: Boolean, Default: True
The condition evaluated for each element using Current Array Element. Elements for which this evaluates to True are counted.

Workshop.codes