How can I have an Actor BP pull a variable from the mycharacter BP?

I’m wanting to setup the player’s attack value. I have a variable called Attack and it is set to ten. Now in my Enemy Actor BP, I need to call that variable as its going to be the damage. I am trying to set up an interface. I have a function called get attack value with an input of interger called attack. But where I am confused is I am not sure how to directly pull that variable from the player BP and plug it in to the get attack value function.

Hey,

You could try something like the following:

PlayerCharacter Blueprint

When attacking set a Bool variable to True and False when not attacking.

Enemy Blueprint

Use the Cast To node to pull the variables supplied from your PlayerCharacter Blueprint. Attack Damage is a variable that is created in the PlayerCharacter Blueprint and the Attacking Bool mentioned above is also pulled. Only variable you need in your Enemy Blueprint is an overall health value to subtract from (I also destroy it after Health is 0).

Hope this helps,

-W

In my enemy bp, i am still not gettin a reference to the variables. I did the first part in the mycharacter, but in the CastTo Character node, Im not seeing how you got the Target/PlayerAttacking node.

My apologies, I have found it.
Just for reference, drag out from the bottom right node and type “GET” and you will see all the varibles from that BP. Thank you.