Damage Overflow System

Function local vars are a part of the function itself. Local vars do not retain value changes once the function has finished. They “reset” to their defaults. Each of which in mine are 0.0

If you replace these with globals then you have to “RESET/CLEAR” them before you RETURN. Otherwise they will retain the values set in the function.

You can call the function from any class that has a reference to the owning actor.


Function usage

Some Event/Function determines the damage output of a hit.
e.g. 212

Pass that value to the “Calculate Damage” function (Incoming DMG).
Function Returns what Player should receive and what the Armor should receive.

Player Health - Player DMG
Armor Health - Armor DMG


The only way armor is being reduced to 0 from a single hit is if the absorption dmg exceeds armor health or its being deducted multiple times.

Re-walk your flow logic.