So, I am trying to do something apparently simple:
Lets say I want to manage my characters health via a component. So I create a new BP inheriting from Actor-Component: BP_HealthComp, where I set:
2 floats: Health and MaxHealth.
4 functions: TakeDamage, DoHealth, SetHealth, SetMaxHealth
Now in my HumanCharacter blueprint I add the component created above: BP_HealthComp, and I do the same for my OrcCharacter, DragonCharacter, etc.
However, values like MaxHealth would differ depending on the character type. And I would need to override some functions like the TakeDamage which is different in a dragon than in a human.
So, is it possible to override a component’s functions? What would be the proper approach if not possible?
I checked also Interfaces, but from what I could see, you can’t set a default implementation with interfaces and you can’t add variables to interfaces either.
Maybe this is not possible via Blueprints and C++ is needed? If so, any tutorial?
Thanks in advance,