Get variable by name(?)
First of all , i apologize for misleading tittle, because i dont know how to describe it.I just started using unreal engine 4.
I have a player actor which has "Target" actor reference variable. The target variable is changed by gameplay blueprint (selected) and I have enemies called "Enemy 1" , "Enemy 2". I want to get variable from actor which is in "Target" Variable. how i can achieve something like that on bottom?
Note: im not asking why it wont allow connect , i just wanted to show how i want it look like.
You will need to cast the "Target" variable to your specific blueprint type which has added the "Max Health" variable.
Right now your "Target" is a regular actor and doesn't 'know' about this variable called "Max Health".
So drag "Target" to an empty space and type "Cast", in the short list you should find your "Enemy 1" (or Enemy 2 as seen in screenshot) blueprint class, select this then you can connect the appropriate pins (the blue one on the bottom) to your "Max Health".
answered Oct 25 '15 at 03:31 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here