> For the complete documentation index, see [llms.txt](https://unfinishedstudios1.gitbook.io/fp-motion/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unfinishedstudios1.gitbook.io/fp-motion/components/player-events/api.md).

# API

## Fields

{% tabs %}
{% tab title="Normal" %}

| Field        | Description                                                                                                                 |
| ------------ | --------------------------------------------------------------------------------------------------------------------------- |
| Sprint       | Action used for all components to know when the player is sprinting and when he is not.                                     |
| Aim          | Action used for all components to know when the player is aiming and when he is not.                                        |
| Crouch       | Action used for all components to know when the player is crouching and when he is not.                                     |
| Shoot        | Attempt triggered when the player tries to shoot by using the shootKey, (**this event is used when subscribing to shoot**). |
| ShootHold    | Attempt triggered when the player tries to shoot continuosly (holding the button down) by using the shootKey.               |
| ShootOnce    | Attempt triggered when the player tries to shoot semi-automatically (clicking repeatedly) by using the shootKey.            |
| Reload       | Attempt triggered when the player tries to reload by using the reloadKey.                                                   |
| ChangeWeapon | Attempt triggered when the player tries to change weapons by using the changeWeaponKey.                                     |
| GroundState  | Value containing the controller's grounding state.                                                                          |
| Velocity     | Value containing the controller's velocity.                                                                                 |
| {% endtab %} |                                                                                                                             |

{% tab title="Persistent" %}

| Field         | Description                                                                                        |
| ------------- | -------------------------------------------------------------------------------------------------- |
| MotionOff     | Persistent action used for all components to know when the player is crouching and when he is not. |
| CurrentWeapon | Persistent value containing the player's current weapon.                                           |
| {% endtab %}  |                                                                                                    |
| {% endtabs %} |                                                                                                    |

{% hint style="info" %}
Persistent events are a special type of event that does not remove listeners when the game-object they were on is destroyed, or inactive.
{% endhint %}

**Other fields**

| Property          | Description                                                        |
| ----------------- | ------------------------------------------------------------------ |
| motionOnByDefault | Determines if procedural motions are enabled when the game starts. |
| sprintKey         | Key used for the player to sprint.                                 |
| crouchKey         | Key used for the player to crouch.                                 |
| shootKey          | Key used for the player to shoot.                                  |
| aimKey            | Key used for the player to aim.                                    |
| reloadKey         | Key used for the player to reload.                                 |
| changeWeaponKey   | Key used for the player to change weapon.                          |
| turnOffAssetKey   | Key used for the player to turn the asset's effects ON/OFF.        |
