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)
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?
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!