Calling a variable from a blueprint (which is also a variable) in another blueprint


I am trying to get/set a variable of a blueprint actor class in another blueprint. I want this blueprint actor class to be a variable (so this is going to be set elsewhere). How could I do this?

When I try to do it this way, Unreal wants me to chose a specific actor class right away to get the variable of this class.
My “life” variable exists in different blueprints (they are called the same).

I think you have to cast…

Yes! That’s it! I casted it to the parent actor class of the items I needed to chose from. I find all this a little confusing but it works.

Any idea what I would have to cast it to in order to have access to the blueprint of my characters?

No, because I don’t know your character blueprint structure. Either you have to setup the inheritance correctly, or it’s just easier to do a GetAllActors on your parent class.

I made a parent with the required variable to all of my characters. Thank you very much for your help!