I’d like to create an Actor Component in blueprint.
The way it’s supposed to work is that, when this component is added to an Actor, the Actor takes on certain game-related properties:
- it gets a “team”
- it gets an “owning player”
- it gains the ability to “be selected”
- when selected, it surrounds the actor with an “I’m selected” effect
I can do the first three easily, because the game play pays attention to instances of this component for most of the logic.
However, I can’t figure out how to add a static mesh component to the actor that the blueprint component is attached to.
I can call “Get Owner” to get the actor, but I can then not actually call the function “add static mesh instance.” The function is simply not there.
Meanwhile, in some Actor blueprints, (not component blueprints,) that function is available.
I also toyed with the idea of creating my own static mesh actor and dragging it around, in the creation script (or perhaps some “on attached to actor” hook) but it appears that the “Event Create” and the “Creation Script” do not exist for component blueprints, and it seems that there is no “attached to actor” hook for component blueprints.
What am I missing? It shouldn’t be that hard for components to modify their actors, should it?