I want to use an interface to call the same function on different actors but when I try to drag and drop the functions into the actor blueprints it wont let me.
the long story is that I want to be able to call a function called “activate” on two different actors a turret and a building, with different effects on each. I think I can use an interface for this by having the player-cast initiate the “activate” function in the interface which will set a boolean variable to true the actors (the turret and the building will check if the variable is true and then call their own functions to do whatever.
however in the character blueprints I cant add the function from the interface because it says it is not “blueprint callable” where and how do I fix this?
You will need to add the Interfaces to the Actors you want to have implement their functions. Casting is unnecessary with Interfaces as its an anonymous call to the class asking if it implements the Interface then call the corresponding implementation, otherwise it ignores it and fails.
thank you! was having the same issue.
so the thing is that they are events and not functions, but still there could be a context menu (call / implement) like when you drag a variable into the graph (get /set).
or at least the UI should point the user to the Context Menu more explicitly, because the info about it being blueprint callable requires a series of logical deductions by the user, some of which require some knowledge of Unreal’s basic architecture - meaning it’s not beginner-friendly, which BP should be.
seems like a bug, still here in 5.3, so I’ll leave this suggestion here.