Ressources to better understand Blueprint & object communication

I’m still learning UE and while I’m now able to build some basic blueprints I’m still struggling very much with getting a grasp on how blueprint-to-blueprint communication works, what the proper ways are to call other functions and classes and very much everything else that has to do with calling/integrating functionality that is defined “somewhere else”. I guess I’m just missing a bigger understanding of how “everything” works together and what I can access in what way. So: Can you recommend any tutorials/videos/assays/courses that could help me better understanding these basics?

Because right now I’m just using trial and error making a big mess and I’m sick of it. I want to learn how to do it properly and the basic UE documentation/introduction doesn’t seem to be enough for me :slight_smile:

1 Like

Check out the 3 links in this post:


You can also drop a post / new thread with a hypothetical scenario and spark up a heated conversation about how to address it best.

In the most simplest of terms communication requires a reference to the other actor/component (class). To really grasp communication between classes you need to understand class inheritance. Every class derives from a Parent class. Most commonly an Actor (Actor Object Reference).

Take for example the First and Third Person Template Characters. If you walk the inheritance chain backward you would end up at an Actor.

Actor → Pawn → Character → Your Specific Character Class

Hit results (Hit Actor) && Overlaps (Other Actor) are explicitly generic Actor Object References.

If you want to call a Custom Event/Function or get/set custom variables you’ll have to cast to the specific class.


Blueprint Interfaces (BPI) is a lighter weight bridge for function based communication that does not require casting. You just need to create specific functions in the BPI. Then implement them in the specific class.

Note, ONLY the class using the BPI functions (pic 2 & 3 below) needs to implement the interface in class settings.

Classes calling the BPI messages Do Not need to implement the BPI.


Then there’s Event Dispatchers which require class specific references (casted or get all actors of class) and Binding a delegate. This is mainly used for Many to One or One to Many communication.

A “One to Many” example would a be light switch that controls many lights.

In the above code EACH light Actor would get a reference to the Light Switch class and Bind Events to its Dispatchers.

Interacting with the Light Switch would execute the Toggle on/off events which calls the appropriate Event Dispatcher. This is essence broadcasts Turn Lights Off/On and any class that’s has a binding for those events will execute local logic.

A more practical approach would be having the ability to designate specific lights to specific switches.

Add an Actor Tag to the Light Switch instance, then use that tag in a Get All Actors of class with Tag node.


Here are DOC references to review.

3 Likes

Wow, thank you for all the time you took to craft this answer! Really appreciate it! That is definitely very helpful! I will work through it and play around with the different options!

2 Likes

So… I’m back :slight_smile: I worked through your info which helped me a lot (again, thank you) but now I’ve a very specific issue which might be a good example of the kind of problems I’m struggeling to grasp. Again I’m not nesscesarily looking for a solution for this single problem, but I want to reach a point where I can solve this myself. Maybe you have some more ressourced for that?

Let me describe you the issue at hand: I tinkered around some more and stumbled across the Gameplay Ability System. I followed some tutorials to implement it and it works as expected. But now I want to do more. For example from my test-ability blueprint I would like to reach a function that is implemented in my character - or going even further I would like to reach a functionality that is provided by a different component that is added to my character. I know there is some sort of “connection” because the ability can eg trigger animations on my character - but how does this work?

This is a prime example of the part I just don’t really get. How would something like this GAS_Ability be connected to my character that is calling this ability. And how would I navigate this connection. And most importantly: How would I find out myself what type of connection I’m dealing with the next time I’ve an issue reaching some functionality?

Hey, Rev0verDrive did a great job explain it! If you need a visual example that builds on what he is saying.

Here are 2 videos that will help :grin:

Just want to note that the second vid shows the use of Get Player Character which requires an index. This will not work for multiplayer projects.

The Index for player 2 on the server is 1. Player 3 would be 2 etc. Same applies to Get player Controller… All the Gt nodes that have an index input.

:+1:


Here’s the multiplayer approach given it’s for an attached actor such as a weapon.

BP Interface

Character Class Interface Function

Weapon class Macro

Weapon Class Usage

1 Like