Allright so I am developing a game where the player has two different types of hit points them being called “health” and “shield”. The point is that it should first take damage to shield and after it gets to 0 start taking damage to health. However I’ve noticed that when shield gets to 0, it takes few seconds before the player starts to take damage to health which means the character can take some extra damage, which is obviously not wanted. Below I’ve inserted photo of the damage blueprint I currently have (just ignore the timer stuff, it is for regeneration which is working fine.) Could someone of you explain, why there is a delay when shield gets to 0 and it should start taking damage to health? Thanks in advance to anyone who helps!
Ran some checks and noticed that shield took one extra tick of damage which caused the delay. With your tips I was able to find a fix so thank you!
You need to desribe what kind of damage is character is taking, because i don’t see anything that would cause a delay so issue might be in way AnyDamage is called. I see other issues thru:
-When player will have at least 1 shield it wont take any heath damage
-Shield is negative if damage is higher then shield amount
As first one might be intended, at very least check if shield is negative at the end of shield damage and set it to 0, other good solution is to use “Min” (Minimum) node on damage amount and shield amount and use it as a damage amount so it won’t able to inflict damage higher then shield amount
Ok i convert to anwser then