Invoke function of Component on same Actor

Hello all, Unity refugee here. I am currently trying to bring over a system I made in Unity over to Unreal to see if switching is viable. While a lot of things I was able to find by looking in the forums, I can’t find any answer to this:

I have ActorComponents “Interaction” that correspond to the “Interaction (Script)” in the Screenshot. “Interactable” ActorComponent that holds an array of all Interactions on the Actor and on the Player I have “WorldInteraction” SceneComponent, that invokes the “Interact” function on the “Interactable” with the current index, so which “Interaction” should be triggered.
Now I want to invoke functions on other components in a generic way, from each “Interaction” Component like I did in Unity in my screenshot. For example I want to add a “Crate” Component that has “Carry” and “Drop” functions, that get triggered when the corresponding “Interaction” triggers them.

But I don’t see a generic way, to Invoke Functions on Components that are on the same actor, without specifying the Component Type(?) beforehand.

Any help would be appreciated :slight_smile:

I would say you should look at creating a BlueprintInterface for interactable function calls. It’s a fairly standard way of creating agnostic functional behavior for Unreal. (Or use a C++ UInterface if you’re porting logic into code).

1 Like

Thanks. I will have a look at it.