# Respawner NPC

## Overview

This component allows an AI Character to respawn after it died. Works similarly to the Respawner component.

<figure><img src="https://963537199-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lzhr1XSMzMqNXjRnNlb%2Fuploads%2Fr20y5ToQJSuDu2kSPkX7%2Fimage.png?alt=media&#x26;token=da166ee7-b832-49a9-87e9-5dc37dcba7e7" alt=""><figcaption></figcaption></figure>

## How it works

It will listen to the states this character has, and if the character activates **Death** State it will reset the Animal Controller after a given time. It also teleports the animal to this GameObject position.

&#x20;

## Parameters

### NPC

&#x20;Reference for the AI Animal.&#x20;

You can assign a Prefab here, without having an animal on the scene.  This will automatically instantiate the animal on Start.

### Respawn State

State on which the Animal will be respawned. If this parameter is empty. it will use the Default State (Idle)

### Respawn Time

Time needed to restart the game or respawn the animal, after the animal died.

### Destroy After Respawn

If the NPC is a Prefab. It will leave behind the Death Animal mesh. Set true this parameter to remove the dead character.

### On Restart Game

Invoked when the Scene is restarted.


---

# Agent Instructions: 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:

```
GET https://malbersanimations.gitbook.io/animal-controller/secondary-components/respawnernpc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
