Hello.
First of all, im not asking anyone how to help me make logic that i will use for my hp/mana system, but how to build framework, or interface, which will have some inputs and than outputs.
Instead of making Health and Mana system for every Actor or Pawn i have in my game, is there a way to create Interface or Framework for health and mana, so i will just have to override certain variables?
How would i like it to look is something like a class function with “setters” as input and “getters” as output.
In hidden layer(update), that class function should use a overrided Event Tick from setter Actor/Pawn/Character… and than plug that in Sequence, and every tick should check for some variables, for example there would be a boolean variable to check wether hp/mana is full/empty.
Also,if i think twice, it does not even need to override Event Tick from setter Actor/Pawn/Character…It can be called like a standard blueprint node, for example “Set Actor Location”.
Consider this:
ThirdPersonCharacter_Blueprint → Event Graph → Event Tick (gets plugged in HP_MANA_SYSTEM function) and in hidden layer(update) that gets pluged in Sequence which checks every second certain conditions and acts appropriatly.
This would be easy way i guess. One less input.
In C++ that would be like a some base class, and every entity(Actor for example) will inherit that base class and have its own “Constructor” or “Setters” i would prefer for its own Hp/Mana/ManaRegen/Full/Empty…
And since i dont know anything about UE4-s C++, could that be done trought blueprints, instead of creating a new C++ class?