BP Interface for passing variable between 2 blueprints

Need a bit more assistance tweaking some of my BPs.
Here’s what I am trying to accomplish:

When a bullet hits a target, the target is destroyed and spawns a nice explosion effect. all fine and dandy.
However, I am trying to spawn a 2nd bp effect that displays a text render with the amount of points that target had.
In the target BP, I have a variable PointsValue (int) that stores the points for the target.
I created a BPI called BPI_PointsValue.
Added a function inside it with an input var PointsIN and an output var PointsOUT.

Implemented the interface in the target BP and in the PointsEffect BP
In the target BP I use the BPI with a message and input the PointsValue var in input: (as the target ref I use a ref to self - not sure if this is why it’s not working)

In the PointsEffect BP on EventBeginPlay I call the BPI_Points set its output to a local var called Points2Render → SetText to Points2Render.

No error messages, but it always displays 0 :frowning:

What am I doing wrong? Any tips are greatly appreciated. I thought I understood BPIs… looks like I have no clue

In your Interface.
you don’t need an output for Points. just an input.

In your Source, you call a Message to the BPI_Points event, giving the points as Input value.

In your Target BO, you implement the BPI_Points Event (this is an independent Event) that has your points value as Input, that you then use.

Sorry, this thing confuses me so much. My apologies.

So, the Barrel BP is the source, (one that has the points pre-set) and I need to send the points value to the PointsEffect BP. Where do I use the message? and where do I use the event?

also, what do I use as target ref for the message ?

Ok… what exactly is the purpose of each BP?

The Barrel is used for what?
Ehat is the Point Effect BP doing? Is it existing ir spawnd by the Barrel?

Barrel is the actual target that the player shoots. PointsEffect is being spawned by the barrel when it is destroyed

then you don’t need an Interface.
In your Point Effect BP, add a Variable Points. Click on that variable and in its Details set “Expose on Spawn” and “Instance editable” to true.

now, when you spawn the BP, you can pass in the points directly in die SpawnActorFromClass Node.

Interfaces are a way to deal handling of values between unknown types of Actors… like… Player and 50 types of enemies/npcs/interactables… but if you spaen the pointeffect on hit… just give the value on spawn

@BDC_Patrick OMG! That is so cool. No need for any interfaces or casting. Exposing it on spawn makes it available in the SpawnActorFromClass node. Wow. So easy and makes so much sense.
Thank you sir. You rock!