> For the complete documentation index, see [llms.txt](https://malbersanimations.gitbook.io/animal-controller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malbersanimations.gitbook.io/animal-controller/secondary-components/respawner.md).

# Respawner

## Overview

This component is in charge of Spawning the Player Animal back into the scene after he is death.

<figure><img src="/files/yvf8jlWOkpzD7ZDUAMzI" alt=""><figcaption></figcaption></figure>

If no Player is assigned it will search for the Animal that has the Player option enabled:

<figure><img src="/files/7MhwQ1O1Grptjad3VVNk" alt=""><figcaption></figcaption></figure>

It will listen to the States this character has, and if the character activates **Death** State it will Restart the scene.&#x20;

If the Player parameter set is a Prefab it will instantiate it on the Respawn point.

This component works along with the CheckPoint component. If an animal enters a checkpoint the Respawner will move to that Checkpoint position and it will store the last State the animal use on that checkpoint.

## Parameters

### Player

&#x20;Reference for the Animal Player. If this parameter is empty the Respawner will find the Player Animal on the scene Using MAnimal.MainAnimal.&#x20;

You can assign a Prefab here, without having an animal on the scene, this Animal Prefab will be instantiated on Start.

### Respawn Point

Position to instantiate the animal. Usually is set to the same GameObject that has this component

### Respawn State

State on which the Animal will be respawned. This value by default is Idle. When an animal interacts with a **CheckPoint**, the Last State that the animal had before entering the checkpoint.

### Respawn Time

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

### Destroy After Respawn

If the Player 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.
