Blueprint Interaction

Hi guys

I want to be able to have a bool variable in my character blueprint that is accessible to all other blueprints in the same blueprint interface as my charicter blueprint, but i want to be able to access this bool variable without having to specify which blueprint i want to send it to, or without having to manual add other blueprints to an array.

the reason i need this is so that my player can have two mode one mode the player can not see information about objects but can interact with them the second mode is so the player can see the information and interact with them.

any help would be greatly appreciated

Bump…

Create an interface function. In your character BP, open its graph, and inside of it, simply connect the variable you want to share to an output pin of the same type (i.e. if you want to get IntAmmo, inside the character BP’s instance of the Interface function you created, simply Get IntAmmo and connect it to an Int output).

Now, any time you need that variable in any other BP which implements that interface, you can call that function with your character BP as the target pin. That will call the function as it exists IN your character BP, meaning it will retrieve the variable from your character BP and pass it to the output pin, which you can access from whatever graph called the function.