So I have a blueprint BaseCharacter_BP that inherits from my interface blueprint. The moment I add an output variable to my interface-event it automatically becomes a function instead of an event. But I can not implement the function in my BaseCharacter_BP (error: " name_of_my_function is in use by another variable or function!".
How am I supposed to implement an interface-event or interface-function in a blueprint that has an output value?
See also: Can't call interface event - UI - Unreal Engine Forums where it is suggested to implement a blueprint function instead of using the event (since the event no longer exists when having an output variable). But doing that gives me that error " name_of_my_function is in use by another variable or function!"
well, if you get an Error, try to fight it. Can you show me the Interface Function you are trying to use (so the Inputs and Outputs) and the List of Variables and Functions that you have in your Blueprints? (:
As seen in the screenshot it’s obviously having a problem with the function I try to make (which I need to implement in the blueprint…) and the one in the interface.
Usually when you create an interface function, you also need to implement the function in the class (or blueprint in this case). But UE4 doesn’t allow that.
I still gotta look into delegates. But it seems those are c++ only and my enum is in blueprints and well, it’s gonna be a huge mess. I don’t understand why the moment I use an Output-variable that UE4 is like “no, now you have to do it completely different and now we want you to use C++ instead” which makes no sense.
Thanks that solved it. One more question though, when I have a PlayerCharacter that inherits from BaseCharacter (which has the interface) then I can not get the interface menu to show in PlayerCharacter so I can implement/override it. I have “Show inherited variables checked”.
Am I doing it wrong again or is it not allowed or?
In a derived class, you are not actually implementing the Interface anymore.
You are OVERRIDING it. So inside of your Child Player Character, go to the FUNCTIONS Menu on the left, where you tried to create a new function earlier. Hover with your mouse over the Header Bar where “Functions (xy Overridable)” stands.
If you click that, you can implement new behavior for it. The “Parent: GetTeam2” can be used to call the implementation that you did in your Parent class.