Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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.

Product Version: Not Selected
more ▼

asked May 28 '14 at 03:16 PM in Blueprint Scripting

avatar image

116 34 28 42

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first


You could try something like the following:

PlayerCharacter Blueprint alt text

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

Enemy Blueprint alt text

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,


playerbp.png (56.8 kB)
enemybp.png (147.5 kB)
more ▼

answered May 28 '14 at 04:00 PM

avatar image

DizzyWes ♦♦ STAFF
5k 145 64 206

avatar image VigeoJames May 28 '14 at 04:31 PM

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.

avatar image VigeoJames May 28 '14 at 04:40 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question