I have an interface between two blueprints, one is the main player character and one is a ball that the player character can spawn. In the character BP is an object reference to the ball that will eventually be created. When I want to do an interface call from the character to the ball, I am not able to drag off the object variable and spawn the interface call node. If I spawn the interface call node with “get all actors with interface”, I can delete the get actors node and then plug the empty variable into the function call node, and it seems to work fine. My question is whether or not it is ok to do this or it’s eventually going to cause problems, and why I can’t just drag straight from the object variable to get the call node.
What type is the ball reference?
Basically an interface can be called on absolutely anything, whether the object supports the call or not. That’s the point
It’s an object variable. I think I am confused because there is two different ways I can call the interface function.
Either of these functions will work, just one has to be spawned in a weird way and has a cool letter on the corner. In the screen shot it is two different interfaces and functions but you can set it up so that the same interface and same function are like this as well. Is there a difference between these?
The second is incorrect
The one with letter is what you want, the other ‘knows’ about your gold ball, which defeats the whole point.
The type of the ball should be ‘actor’. That’s most neutral.
I’m still really confused about the purpose of the white pin one and when you would want to use it. If anyone knows a good example that would help. Is it just the same thing as using a cast node except you run the function from the bpi?
Anyway, thanks for the info!
It’s a bit yellow, I think
Each BP that implements the interface, can have an implementation of each function in the interface. When you get the yellow pin, it means you’re calling the implementation of this BP from within the same BP.
Ya its a lot more yellow than white. That makes sense, thank you for the info.