# Change animation blueprint variable

**URL:** <https://forums.unrealengine.com/t/change-animation-blueprint-variable/371564>\
**Category:** Character & Animation\
**Tags:** unreal-engine, editor, UE4, CPP, Blueprint, question\
**Created:** [September 25, 2016, 12:35pm UTC](https://forums.unrealengine.com/t/change-animation-blueprint-variable/371564 "2016-09-25T12:35:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mamoniem](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mamoniem/32/1194698_2.png) [@mamoniem](https://forums.unrealengine.com/u/mamoniem)\
**Post date:** [September 25, 2016, 12:59pm UTC](https://forums.unrealengine.com/t/change-animation-blueprint-variable/371564/2 "2016-09-25T12:59:27Z")

</div>

Defaiantly you need to set “isAttacking” to true while attacking and then reset it to false by the end of the animation. ABout the how to do it, so let me ask you first where is the “isAttacking” variable is?

- If it is in the animation blueprint, so you can get the current animation blueprint and set the value using this way:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

- The other way, which i mostly recommend, is to have the variable within the character class (blueprint) and another variable with the same name and type within the animation blueprint. And you always set the variable value (within the animation blueprint) to match the one from the character class, always in the update (Event Blueprint Update Animation). And if you asking how to do it, so in ur second screenshot:

If not clear, let me know.

-m

---

_[View the full topic](https://forums.unrealengine.com/t/change-animation-blueprint-variable/371564)._
