> 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-players/on-player-killed.md).

# On Player Killed

![](/files/9M7VHrjBe9WBYrmYQx3s)

## Description

Event called when any player dies

## Node Type

Nodes fall into two basic categories: Data and Execution. This node listens for an Event, then triggers it's node string.

## Inputs

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

## Outputs

| Output        | Type          | Description                                                                  |
| ------------- | ------------- | ---------------------------------------------------------------------------- |
| Killed Player | Object        | The player who was just killed.                                              |
| Killing Unit  | Object        | The unit who killed the player.                                              |
| Death Context | Death Context | Includes information like what weapon was used, etc (see Death Context page) |

## Learn More About This Node

While the name of the node suggests that it covers all forms of death, this is not the case. It is important for scripters to be aware of these limitations to avoid any unintended consequences.

One of the main limitations is that there is no equivalent 'On Player Died' node. For instance: changing teams while alive in the game results in a player respawn instead of death, which can be a source of confusion for scripters as they don't look different from the player's perspective.

Specifically, it will only trigger for certain causes of death, such as being killed by another player's weapon. It does not trigger for deaths caused by environmental hazards, such as falling from a great height or drowning.

It is important to keep these limitations in mind when designing scripts that involve player death.

\
\
**Contributors**

Captain Punch\
AddiCt3d 2CHa0s


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://wiki.thescriptersguild.com/scripting/nodes/events-players/on-player-killed.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
