How to have blueprints pass variables to each other through blueprint interfaces?

I want to have a blueprint that will process only numbers and set variables and then pass that information down to other blueprints to set the variables in the respective blueprints. I was wondering how i could pass them down using blueprint interfaces. I have read the tutorials on it without much luck. I currently have a input and output in the interface and i am able to set values there but once i start trying to change the variables in the blueprints they do not change overall and are not transferred to the next blueprint. How would i have this so it will allow variables to be changed in one blueprint and passed to the other?

Thank you for your time.

What you need to do is to go into the interface function in your receiving blueprint (just double-click it in your variables tab) and define what your interface will do. There are only two nodes created by default and the output on ReturnNode doesn’t seem to do anything.

Let’s say you pass a bool in, then between the two nodes that are created you need to set your variable in the target blueprint to the bool output on the left node that has your function name on it.

Here’s an example from my own project, just doubleclick “PlayerDeath” to the left, set the variable in the function then use the variable somewhere else. You don’t even need to place the interface node at all.

How does this work exactly with your blueprints? This is how I’ve been using Interfaces:


I start by dumping some data out of one of my blueprints. In this case, this is in my Character blueprint. These are some basic stats about my character that I want to display on screen.


This is what it looks like when I call that function on my player character. It works exactly like I wanted, allowing me to display the information from these variables on my HUD. However, I’m now trying to pass a Bool through this same concept and it never works. The set up is like this:


Vary simple, just like my first image, except that I’m using a bool. This is set in my Pickup_Health blueprint. The blueprint can detect if the player is looking at it or not. If it is, it enables key interaction on the player, allowing you to hit E to use the item. This works just fine, here is the section that sets the bool:


Since this works fine, I know the bool is being set to either True or False. However, in my HUD blueprint I get a different result. My best guess is that I’m not targeting the object correctly. The Player status information I mentioned earlier uses the Get Player Pawn action to select its target. However, if I use Select Object, as shown here:


It always posts as False. I have the Pickup_Health selected in the Select Object options and I still return nothing…

I think in your Is Looking function (in the interface blueprint) you need to add a bool parameter in the Inputs part.

2378-capture.png

How do I get the interfaces to show up in my blueprint? (Like in this screenshot) I’ve setup my interface but I do not understand how to get the blueprint to see them.

Edit: Adding it via blueprint props is the answer

Thanks for the edit! That is what I was trying to figure out too.

Hello,

This is a question from the beta version of the engine. We are marking this answered for tracking purposes. If you are experiencing an issue similar to this please post a new question.

Thank you.