How to pull variables from other blueprints using Overlap Events?

I have two blueprints: PlayerBP and EnemyBP.

Both blueprints are of the Paper2D.PaperCharacter class.

I’m using the blueprint below on my player in attempts to determine if the object I’m colliding with is an enemy or not. When I do collide with the enemy blueprint (which was drag and dropped onto the level) I get a returned value of “cast failed”.

The variable “Enemy Type” resides within the EnemyBP blueprint, and is NOT set to private. I’ve looked over a couple documents but I’m not quite sure what I’m missing.

Turns out the issue was with common sense not the blueprint. I had dropped a sprite down for the enemy instead of the blueprint itself.

Just in case another comes across a similar issue here are the steps I took to make this work:

  1. Generate OnOverlap Event for the player’s Sprite (or capsule, whatever you choose).
  2. Created the Player Blueprint shown (PlayerBP).
  3. Within the Enemy Blueprint (EnemyBP) I set variable “EnemyType” to private and exposed (made public) a function (Return Enemy Type) public which returns the value of EnemyType.

Not sure if this is the Unreal Engine way but I’d rather expose a function than a variable for readability reasons.