Download

Adding components to an actor in another component

So I want to be able to add components to a character from within the blueprint of another component. But for some reason it wont show me the appropriate nodes. Even with “Context sensitive” turned off, check this out:

Am I just not allowed to do this? If so, why not?

Is there some way I can get around it?

You might say I could do my component adding in the character blueprint, but I can’t do that. I have a bunch of character subclasses which all need this beahviour, and inheriting from all of them to add behaviour is a terrible way to do things (bloody inheritance). Adding a component to all the different characters is a far better way to do it?

But I don’t seem able.

Any thoughts on this?

It appears the Add ** component blueprint nodes are created differently to normal nodes, and they all seem to reference the actor function “AddComponent”, but I have not found a way to call that function in blueprints from a component.