# 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)


---

# 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://docs.gercstudio.com/other-components/events.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.
