Hello. Thank you so much for making this tool. I just bought it yesterday and it’s looking very informative and useful for what I’m doing! I’m still relatively inexperienced at coding and Unreal Engine, but I have a question.
I added attack and defense stats that determine how much damage an attack should do to a target. The attack is added to a unit’s equipped weapon and put into the damage variable that was already a part of BP_Unit. In the Take Damage function I have the target’s defense subtracted from the damage to determine how much health should be lost. It seems like its calculating the damage correctly, but the health bar is not displaying properly. It is removing a percentage based on the damage calculation without factoring in defense, yet the unit’s current health stat after being attacked is correct. This leads to situations where the unit disappears from the grid as if they died once their health bar reaches 0, but they can still be moved around and have health left (although they cannot attack or be attacked).
Basically I would like to know how to correctly update the health bar and what I would have to change with my current system to do that. Sorry if this is a silly question, I just can’t figure out what is going wrong.