[REQUEST] Allow Overriding Input-Only Blueprint Interface Functions

Unless this was added in 4.12 which I don’t think it was, this seems like a silly limitation to me. If I want to have a blueprint interface function with no outputs (it just takes in inputs and modifies variables, etc in the blueprint it’s being implemented in), I have to do it by connecting the functionality to an event and calling the function from the event I actually want to call this function from.

I’m going to end up just adding an output so that I can implement the function by overriding it, but this is silly. I shouldn’t have to do that to access the functionality that all interface functions should have.

Sry but I completly dont understand what you mean? You want to have it in a seperate graph like Fuctions? Well you have more flexibility in that case. Add another Graph and put all your Interface Functions without outputs there like this Screenshot - 66965908b972d37361b4e03c21b2d8bc - Gyazo

There are no Limits on Interfaces and I hope you dont do something crazy like this Screenshot - 24556f1b7415a88577c73b7325e795ab - Gyazo

If you really want to have it as Function check the “const” in your interface and it will appear as Function in your BP like this Screenshot - 5ef93200b976d303aaf5ce9cabf730bb - Gyazo

Little extra Note: be aware that you cant use Nodes like Delay and similar over time things with Functions!

Good Luck and have Fun

Nacht, what I mean is that if you have an interface function with no outputs, it doesn’t show up in the Blueprint Editor menu with all the variables and such where other interface functions with an output do show up.

I did not know that the Const thing did that though. What does the Const mean? That would solve my problem in theory, but it seems like a weird thing you’d have to check off to make it work right. Is this implemented this way for performance reasons or something? I just don’t see why you wouldn’t have all interface functions show up together there so that you can override them.

const is a special thing you can google up Const Correctness if you want to find out more about that I thought you had enough experience to know what that means so I didnt mention it any further. (You should btw if you plan to use them)

They dont show up in the list because they use a Event Node. And Event Nodes only show up in the Graph List if you place them in the Graph. Otherwise UE4 would need to place those Interface Nodes as soon as you Add the Interface (technicly speaking I think it even does but not visible to the User, cant confirm that). Thats it =)

For any Child BPs you create the will however show up in the “override” dropdown since its a know thing at that Point because your Parent requires to Implement the Interface even if its Empty.

I have plenty of experience with blueprints and UE, but I’ve never used interfaces before. Just so I’m getting this right, the input-only functions are meant to be used for other actors to call functions on another actor.

For instance, I would use a damage interface that I put on both projectiles and things that can be damaged, and then when the projectile detects a collision with an actor that can take damage, the projectile calls a TakeDamage interface function on the other actor, which would be an event in that actor’s graph that implements that functionality.

So basically, the input-only functions are events meant to allow easy communication between blueprints, while the input-output functions are meant to be extensible functions for different blueprints to implement their own functionality depending on the class.

Is that correct?

I looked up const correctness but was very confused, as I am only partially fluent in programmerese. Can you give me a simple definition? The reason I ask is because I want to understand what it does rather than just blindly use it because I have to.

Ok I Cover Interfaces for you in the most simple way:

Think of a Interface as a Promise. Every Class that implements that Interface Promises that it can do whatever is declared in the Interface. Lets say you have a Move(Location) in the Interface and you select a bunch of Actors and tell them to Move(Location) via the Interface Call. You as Caller dont care who the Actors are (no type casting needed) or how they execute the Move (exaplle one flys there, one walks there, one rolls there, etc). Its tottaly irrelevant if its a Character, NPC, Vehicle, Jet or a Rock. In C++ you would need to check for the Interface before you Call, in BP its already done for you and it simply ignores everyone that does not have the Interface.

In your Projectile Example the Bullet is the Caller and what it hits recives the Interface Call. What it hits is irrelevant you dont need to know anything about the Object. If it has the interface it Takes Damge (however the thing it hits implemented it) if not it gets ignored, but your Projectile does not need the Interface (unless you want the Bullet to take damage?)

Thats a Interface in a nutshell a simple Promise that certain Functinallity exist without knowing anything about the Object.

The Const Correctness is indeed confusing and it depends on a couple things and where its applied too. There is no simple way to explain it but for the Function it means the things you pass dont get Modified in that Function, but you still can change tha passed parameters (confused already ;P?) that just allows a const Value to use that Function because the Function marked as const and its like a Promise that says I dont change you (even if you do xD) but const Values would straight out refuse to get passed to a Function that would change them. Like in the following example:


Hope that clears things for you up.

Oh I forgot something on the interfaces. They ignore the things that does not have a Interface but the dont stop your Flow! (white wires) so if you have a output on your interface call and try to use it after the Call would screw you over! Use the Implements Interface Node before you try to access the Values.

Thats it =)