> For the complete documentation index, see [llms.txt](https://docs.gercstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gercstudio.com/other-components/events.md).

# Animation Events

To better synchronize character animations and game actions, use various animation events.

### Step Sounds

Add the **PlayStepSound** event with the **float** parameter **Volume** to movement animations for characters and enemies so that footstep sounds plays during the game.

![](/files/-M0rEuBm8-FnM-XhEAwr)

### Grenades

To synchronize an animation and grenade throw add the **LaunchGrenade** event to a throw grenade animation.

![](/files/-M0rEWmOXv9mXXtkkF8V)

### Melee Attacks

To synchronize the sound of a melee attack (for characters and enemies) with animation add the **PlayAttackSound** event.

![](/files/-M0rT2Mn7CPeuWY1-p92)

### Shells

To synchronize an animation and shell spawn add the **SpawnShell** event to the shooting animation and disable the **Spawn Shells Immediately** toggle in the <mark style="color:green;">**Weapon Controller**</mark> script.

![](/files/-M0rFHOsLMmj4Vmk6wVK)

![](/files/-M0rFOsFHRO0Dr_hPdJQ)

## Weapons&#x20;

### Magazines&#x20;

To synchronize the appearance and hide the weapon magazine with the reloading animation, indicate the magazine in the <mark style="color:green;">**Weapon Controller**</mark> script...

![](/files/-M0rS6jG9z8H_n7IsW3A)

...and use the following events:

| Event                        | String Parameter  | Meaning                                           |
| ---------------------------- | ----------------- | ------------------------------------------------- |
| **ChangeMagazineVisibility** | **show**          | Show the default magazine                         |
|                              | **hide**          | Hide the default magazine                         |
|                              | **hideAndCreate** | Hide the default magazine and create a copy of it |
| **DropMagazine**             | **-**             | Drop a magazine from the weapon                   |

### Change Hands

If you use animation in which a character takes weapons in different hands, the following events will come in handy:

| Event            | String Parameter  | Meaning                                                                                                                                                                                                      |
| ---------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **ChangeParent** | **left**          | Set the left hand as a parent for the weapons                                                                                                                                                                |
|                  | **right**         | Set the right hand as a parent for the weapons                                                                                                                                                               |
|                  | **rightAndPlace** | <p>Set the right hand as a parent for the weapons and place it in a default position. </p><p></p><p>If after animation weapon has the wrong position or rotation, this event we'll help you to fix that.</p> |

![](/files/-M0rOYQ5EbtfAp3Duc5V)
