> 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/events-ai/on-ai-unit-killed.md).

# On AI Unit Killed

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

## Description

Event called when any AI Unit dies.

## Node Type

Nodes fall into two basic categories: Data and Execution. This Execution node fires when something happens in the game that triggers it, and starts off the node string.

## Inputs

| Input | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| N/A   | N/A  | N/A      | N/A         |

## Outputs

| Output               | Type          | Description                           |
| -------------------- | ------------- | ------------------------------------- |
| Killing Unit         | Object        | The Unit that killed this AI          |
| Squad                | Squad         | Which Squad the killed AI belongs to. |
| Killed Unit Position | Vector3       | The position unit died at.            |
| Death Context        | Death Context | How the AI died.                      |

\
\
**Contributors**

AddiCt3d 2CHa0s\
Okom
