> 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-squad-state-changed.md).

# On Squad State Changed

![](https://692276616-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN06Vv6nlwviUQ4hI2Kkd%2Fuploads%2Fgit-blob-7d711f170f4406f458f13cb11764d5507b8c6be1%2Fon-squad-state-changed.png?alt=media)

## Description

Event called when any Squad's combat state changes between Idle, Alert, and Active

## 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                                                                   |
| --------- | ----------- | ----------------------------------------------------------------------------- |
| Squad     | Squad       | Which Squad's State has changed.                                              |
| Old State | Squad State | What Squad State the Squad was in before it changed. (Idle, Alert, or Active) |
| New State | Squad State | What Squad State the Squad has changed to. (Idle, Alert, or Active)           |

\
\
**Contributors**

AddiCt3d 2CHa0s
