Multiple blueprints per actor? (composition vs inheritance)

When I first started using UE4, I had a quick try at getting blueprint components working, but didn’t spend much time on it or get far at all. However I would really like to see that in the future. At the moment I am mainly using the child actor component method, but as you said it is far from idea.

I have also thought about using the behavior tree task as a quicker way of being able to create blueprint components. At the moment I have tried using the standard Behavior tree component. Basically creating a Actor class that has a behavior Tree component and then basing all my actors on that. In the Actor’s blueprint I create a editable Array of Behavior Trees. Then created a set of behavior trees each with normally only a single Task, that are my “components”. Then assigned the ones that I want to each actor, and select what tree would be active at what time. But of course this only allows one “component” to be active at a time, although for some of my requirements that is all I need.

I haven’t tried adding multiple behavior tree components to a actor yet and it might work, however by looking at the code for that component and the blackboard one, there is some code in each that tries to fetch either the blackboard or behavior tree component from it’s parent actor and only expects there to be one component of each type. So I don’t have a lot of faith that multiple components will work properly.

However I wouldn’t think it would be too hard to create a custom component that doesn’t have that restriction. My idea at the moment is to maybe write such a component that instead of using a full behavior tree, just accepts a Behavior tree task assigned to it, and just runs that single task all the time. Of course all this is hacky still, and proper Blueprint components would be far better.

On a side note, if you want a tick event in more than one event graph, you can copy the tick event from the main event graph and paste it into another one. Doing so will create a new custom event called something like “Tick event copy”, you then need to call this event from the main tick event. So it is also hacky but might do what you want.