Sorry for not answering on my last post btw. so i made a system where Player takes Damage whenever hes hit by an attack (Hitbox) and A Health system as well, but i had planned of making a system where Player can equip armor and gain Protection However, as i am going with a % system i fail to find a way to make it work. let me explain
so let say an Enemy has 100 Damage, and Player has 10% Protection, 10% of 100 = 10 (Simply enough) the enemy should be dealing 90 damage to the player then.
Now lets say its 150 Damage instead and if the Protection is the same it would be 135 Damage dealt.
but back to 100 damage and 20% it would be 80 damage.
i think you get the idea but i dont know a way to tell the System to decrease the Player health by %
Note also i have a System for The Armor Items where there is a Variable based on the Protection Value
But anyways i hve tried with
On Collission with Enemy_HitBox. Subtract 100 * "ProtectionValue"
On Collission with Enemy_HitBox. Subtract 100 - 100 * ProtectionValue
( ProtectionValue being Lets say "8" to decrease the value of the damage to 92% of 100, i did "Subtract ProtectionValue * 0.1 and it will give 0.8, and that seems to have worked for me in the past) but i keep ending up with wrong results, being either not subtracting anything, or Subtracting way too much Health.
does anyone know an answer to this, i hope i explained it well enough, since its kinda hard to explain without being able to take screenshots? what do i do?