Trouble casting to blueprint

Hi, I’m new to ue4 so please bear with me,
I need to be able to reference other blueprints from a certain blueprint using cast to blueprint (if there is another way please tell me); casting to my character works perfectly fine as I can use “get player character” on the object node. However, I want to reference a pawn blueprint, I have tried using every type of pawn, player, and AI controller (the pawn’s controller is set to AI controller in the class settings), but none seem to work. I would normally simply get a reference to actor from persistent level (by right clicking and selecting the reference) and make the entire code in the level blueprint, but I need the blueprint to be generic and be able to be used in many cases. My game involves multiple enemies that attack the player with swords, all using one blueprint, that act independently of each other, that works fine. A part of my code involves finding the overlapping actors of my character (which works)and checking if it contains the sword blueprint (doesn’t work), as a way of dealing damage to the player. The cast to sword blueprint always fails, the rest works fine.

I have looked everywhere for an answer to this, but I can’t find a solution. Hopefully that all made sense.

This is the blueprint I am struggling with, I have left the “object” node on cast to sword blank as that is what I have a problem with.

That contains node needs a reference to an existing sword blueprint that is set in a variable. something different you can do though is get rid of the cast and set the class filter in the Get Overlapping Actors function to the EnemySword_Blueprint and then get the size of the Overlapping Actors to find out how many swords are overlapping.

I will have a try, thankyou very much!

This works very well, however, I’m still having problems referencing blueprints. How do I reference a character or pawn blueprint that is not the human player, using casting?