Blueprint communication: Decoupling Events between sender and receiver objects

If for example you have 2 BPs: a light and a door.
Both have to interact with the player and both have different behaviours when interacted with.
So, in both of them you implement an interface that contains, for example, the function Interact:

If the player uses linetrace to interact with objects and if it hits something, it will call the interface function Interact of that object. If the object hitted doesn’t have that interface’s function implemented then it won’t do nothing:

As you can see, no cast needed. No need to identify what type of object the actor is. It doesn’t matter if it’s a door, a light, a switch or a rock.