I want to understand the scope of the event dispatcher. I found in the official ue4 document that the event dispatcher section does not explain the area where the event dispatcher works.
Suppose I have a situation like:
I defined the blueprint actors A and B, A defined the event distributor Open the light, the event distributor will be called after the player interacts with A, and the event of turning on the light is bound to the event distributor in B.
Then I loaded two sub-levels X and Y in a large level; level X has an instance of A and B, named A1 and B1. Level Y has an instance of B, named B2 .
Finally, if I interact with A1 in this level, will both B1 and B2 execute the light-on event, or only B1 will execute the light-on event?
If both B1 and B2 will execute this event, how can I limit the event dispatcher so that A1 will only affect B1 and not B2 which is close in distance.
None of this will execute. Dispatchers work with instances. Unless you register the very instance, nothing will happen. You cannot bind a dispatcher to something that has yet to exist: