Doubts with casting blueprints

Hi, im kinda new using ue4 and I have stumble in one of my blueprints, I tried to cast a bullet blueprint in my third person character blueprint so I could access a function a have on my bullet blueprint through my character blueprint, but it seems to not be working, or at least, not doing what I set it to do and I really don´t know whats the problem or if I even set my cast to right, so if anybody could help me in seen whats my problem I´ll be really thankful.

So you’re in the character, but the owner of the character is not of type Pistola_Pickup_BP, it’s the player controller.

You just need a reference to the actual pistol, you don’t need to cast, just pull a pin from the pistol reference and you can call Disaparo.

Sorry, I explained myself poorly, I´m on my third person character blueprint, I have another blueprint, my pistolaBP(gun BP), and what I want to do is access to a function that I have in my pistolaBP(gun BP) through my third person charcater BP. The variable you see in the last picture was not working, sorry for leave it on the blueprint, because I did need to cast to my pistolaBP(gun BP), what I don´t know is what to put in the object part.
If it helps in anyway to know this, mi pistolaBP(gunBP) is a gun I can pick up from the ground, so I don´t want to cast it´s BP on my event begin play and have it attach it to my player, from the very beginning, I have it set it up so when I collide with it, my character “pick it up” and then it gets attached to him, and I dont want to lose that. Thanks in advance.

302196-problemacastto2-li.jpg

Ok, so when you pick it up, you have a reference to it then?

You don’t need to cast, just use that reference, pull a connection off and search for disaparo :slight_smile:

I do have a reference to it, but not on my third person character blueprint, I have that reference in my third person character animations blueprint, on my third person character blueprint I have no previous reference to my gun blueprint, so thats why I´m having trouble accessing to it through my third person character blueprint, because I don´t know how to

Ok 3 common ways to get hold of a reference you don’t have access to:

  1. Make a reference variable in the character, and it your animation BP you can say:

302342-char.jpg

  1. If you can’t do that for some reason, then you can go via the game instance:

In the anim BP you assign it:

302343-animbp.jpg

then you pick it up in the player:

  1. Or, it it’s in the world somewhere, you can pick up a reference in your player using: