> For the complete documentation index, see [llms.txt](https://cowsinss-organization.gitbook.io/fps-engine-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cowsinss-organization.gitbook.io/fps-engine-documentation/content/03.-content/03.3-player/playerstats.md).

# PlayerStats

PlayerStats inherits from [IDamageable.cs](/fps-engine-documentation/content/03.-content/03.6-enemies/idamageable.md), which is an [interface](https://learn.unity.com/tutorial/interfaces). Notice that all Damageable objects in FPS Engine inherit from [IDamageable.cs](/fps-engine-documentation/content/03.-content/03.6-enemies/idamageable.md).

PlayerStats also implements these interfaces: IPlayerStatsProvider, IFallHeightProvider

**PLAYER STATES**

* <mark style="color:purple;">maxHealth</mark>: The initial amount of health points the player has.
* <mark style="color:purple;">maxShield</mark>:  The initial amount of shield points the player has.

&#x20;**FALL DAMAGE**

* <mark style="color:purple;">takesFallDamage</mark>:Enables or disables fall damage. When true, the player takes damage when falling from a great height.
  * <mark style="color:purple;">minimumHeightDifferenceToApplyDamage:</mark> The minimum distance (in units) the player must fall to take fall damage.
  * <mark style="color:purple;">FallDamageMultiplier</mark> A multiplier applied to the base fall damage to determine the final damage dealt. Higher values mean greater damage per unit fallen.

**AUTO HEAL**

* <mark style="color:purple;">enableAutoHeal</mark>: Enables or disables automatic player healing over time.
  * <mark style="color:purple;">healRate:</mark> The rate at which the player's health regenerates.
  * <mark style="color:purple;">healAmount:</mark> The amount of health regained with each heal tick (alternative to healRate for discrete healing).
  * <mark style="color:purple;">restartAutoHealAfterBeingDamaged:</mark>When true, being damaged resets the auto-heal timer, delaying healing until the timer expires again.

    * <mark style="color:purple;">restartAutoHealTime:</mark> The time (in seconds) it takes for auto-heal to resume after being disabled by damage (if `restartAutoHealAfterBeingDamaged` is true).

### Functions and Accessors | PlayerStats.cs&#x20;

> <mark style="color:green;">Respawn( Vector3 position )</mark>
>
> Respawns the player at a given position.&#x20;
>
> * position: Position to teleport the player to.

***

PlayerStatsEditor.cs can be found as an external script.
