How do I enable communication between two blueprints?

You can try this: I also had some issues figuring out an easy way to communicate between blueprints.
It is done using a Blueprint Interface. Easy and fast.

There is a node, get player controller you could use in the event graph, but I don’t think it works in the Contruction script. Then cast the Player Controller to your PlayerBluprint.

Has someone made a tutorial on this yet? I’ve tried all that I’ve read I either get a empty var, or when casting to by Get all actors of class it crashes the editor.

Here;

Do you still need this?

This should be way easier. There should be a hierarchy with the variables. I need to define a number of global variables and level variables to be accessed by all the things on the map… any other engine its easy as cake. You define the variable in the code in the right place and access it from anything else… I wanna scream that this is so complicated here

You can see! helpful for you!

  1. In your event graph place “Get All Actors Of Class” Function and set the “Actor Class” to the BP your trying to get your variables from
  2. Drag off from “Out Actors” and place a “ForEachLoopWithBreak”
  3. You can now drag from the “Array Element” on the “ForEachLoopWithBreak” and you can now see your variables from your other blueprint

1 Like

It is core functionality. There is no reason you need a “BlueprintComms” blueprint just to communicate between blueprints without using level blueprints or dispatchers.

There are many ways to communicate between blueprints, but the simplest and most generic is to use “Get all actors of class” or “Get components by class”. (All blueprints except the level blueprint and the gameMode blueprint are actors or components.) You may need to uncheck “context sensitive” to search for these nodes. Also, note that these 2 nodes are slow, so don’t call them every tick; instead, call them on BeginPlay or in a constructor, and then save them to a variable.

Once you have the actor or component, you can find all of that blueprint’s variables by searching Class->BlueprintName->Get VariableName