After some weeks spent in the Editor, this is my first post here.
I’m extending a sample project, Third Person, and I built and “Enemy” base BluePrint. It handles health, damage, HUD for healthbar of the enemy, and so on.
Today, I’d like to create an EnemyCharacter_BP which will behave like all others Enemies, but is based from CharacterBP (so it has character movement, animation, …). Please not that some enemies (most of them ?) that are not based off Character. (Some of them will even be static meshes that the player need to destroy).
So, here is my problem : if I create the “EnemyCharacterBP” based on Character, it doesn’t have my “health system”. If I create it based on my EnemyBP, it isn’t a character.
I’d like to find something like C++ mixins or PHP traits, but using Blueprints. I tried to use an ActorComponent but it look like, inside it, I can’t access variables from the main Actor. Let’s say I need something like an Interface but with embedding the actual implementation in all of my blueprints (instead of rewriting it).
Any lead would be greatly appreciated !
(Note: If it’s something possible in C++ but not in Blueprints, I can take the leap.)