> 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/death-context/was-last-ai-unit-in-squad.md).

# Was Last AI Unit In Squad

![](https://692276616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN06Vv6nlwviUQ4hI2Kkd%2Fuploads%2Fgit-blob-6354803bef19f9062b8b940e8d16b38c3efa1397%2Fwas-last-ai-unit-in-squad.png?alt=media)

## Description

Queries a *DeathContext* from the **On Player Killed** or **On AI Unit Killed** event. Returns true if the dead AI unit was the last member of its squad.

## Node Type

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

## Inputs

| Input         | Type          | Required | Description                                                        |
| ------------- | ------------- | -------- | ------------------------------------------------------------------ |
| Death Context | Death Context | True     | Which Death Context to check if killed was last AI in their squad. |

## Outputs

| Output                 | Type    | Description                      |
| ---------------------- | ------- | -------------------------------- |
| Was Last Unit In Squad | Boolean | TRUE if killed was last AI unit. |

\
\
**Contributors**

AddiCt3d 2CHa0s
