Download

Actor-Component Dispatching? (BP)

My project contains two Blueprints (BP_Button & BP_Door) either with a component (C_Interactor & C_Interaction). The components handle the logic whilst the actors themselves trigger the logic and store the animations. At the moment I cast to the handed door(s) to trigger the animations, but I really hate this because not interchangable for other blueprints like lights or electronics, resulting in steplike code and probably high ressource usage.

Now i got a little bit into dispatchers. As far I’m understand, dispatchers kind of ‘spam’ their message to all blueprints and if there is a listener, this will execute. But I dont find a way to call an animate-dispatcher within the component so i can set up the visual part of the script for every BP / ChildBP without having to rewrite the entire component.

How can this be managed with ‘general’ dispatchers?

Example image of the cast to Blueprint version

Sollution