Change animation blueprint variable

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:
  • 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:

    1.you grab an arrow from the node (try Get Pawn Owner).

    2.place a node named "Cast To XXXXX) where XXXX is your character class name.

    3.Then you get the variable value from that character class been casted, and use its value to set the local variable.

If not clear, let me know.

-m