Reducing the shield, then hp


I’m am working with the vehicle game template. The car has a sphere attached to it as a “shield”. I’ve got it to where I can take away shield or hp and go to the hud… but what would be the best way to tell the “event any damage” to take away from the shield and then when that variable reaches zero to take away HP? (the shield and hp are float variables) Please let me know if you require additional information if you’d like to help.

Thanks in advance!

this sould be a good start

Mhousse1247 pretty much handled it the way I would. Run the damage through a branch first and try to damage health, but only if shield is equal or less then 0. simple and effective :smiley:

Thanks for replying! There was delaying in me trying it out because I had to re install UE4. I must of done something wrong somewhere else because now the shield does show any damage, and then randomnly all goes at once and the hp doesn’t change…or at least the HUD doesn’t say it changes

Is there something I’m missing?

try Shield>1 (not >=)

Thanks! Although I only got it to work by change the range from 0 to 100 to 0 to 1…