> For the complete documentation index, see [llms.txt](https://wiki.thescriptersguild.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.thescriptersguild.com/scripting/nodes/ai-advanced/get-squad-definition-ai-unit-count.md).

# Get Squad Definition AI Unit Count

![](https://692276616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN06Vv6nlwviUQ4hI2Kkd%2Fuploads%2Fgit-blob-4192e79eac590a2fa6eec943fe80ca1808ff49f9%2Fget-squad-definition-ai-unit-count.png?alt=media)

## Description

Returns the number of AI units contained in the Squad Definition and checks if the whole squad can be spawned

## Node Type

Nodes fall into two basic categories: Data and Execution. This node supplies Data for an Execution node.

## Inputs

| Input            | Type             | Required | Description                                                     |
| ---------------- | ---------------- | -------- | --------------------------------------------------------------- |
| Squad Definition | Squad Definition | Yes      | The Squad Definition to use to count AI that currently have it. |

## Outputs

| Output                | Type    | Description                                                   |
| --------------------- | ------- | ------------------------------------------------------------- |
| AI Unit Count         | Number  | Count of AI Units with selected Squad Definition.             |
| Can Spawn Whole Squad | Boolean | If TRUE, the Squad with this definition can be spawned again. |

\
\
**Contributors**

AddiCt3d 2CHa0s
