> For the complete documentation index, see [llms.txt](https://lightbug14.gitbook.io/ccp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lightbug14.gitbook.io/ccp/how-to.../implementation/actions/use-the-character-actions.md).

# Use the character actions

## Getting the actions struct

The `CharacterActions` struct can be obtained from the `CharacterBrain` component.&#x20;

```csharp
CharacterActions actions = characterBrain.CharacterActions;
```

And If you are working from inside a `CharacterState` :

```csharp
CharacterActions actions = CharacterActions;
```

## Reading the actions

Just access the public member you want from the `CharacterAction` struct.

```csharp
// Bool action ---> E.g. jump (button)
bool jumpValue = CharacterActions.jump.value;

// Float action ---> E.g. horizontal (AD keys)
float horizontalValue = CharacterActions.horizontal.value;

// Vector2 action ---> E.g. movement (WASD keys)
Vector2 movementValue = CharacterActions.movement.value;
```

### Bool actions

Unlike `FloatAction` and `Vector2Action` actions, which are basically 1D and 2D axis respectively, `Bool Action` actions are a bit more interesting. These are basically "buttons", meaning you can read not only the value ("pressed or not") but also the phases involved ("was pressed/released"):

```csharp
// Bool action ---> E.g. a jump button 
bool wasJumpPressed = CharacterActions.jump.Started;
bool wasJumpReleased = CharacterActions.jump.Canceled;
```
