This forum has been so helpful but I realize as I get further in to this that I really need to simplify my questions. In that spirit. I am setting up a simple health bar widget to show when I subtract and add damage. Adding damage is working correctly, when I hit 2 it’s adding in increments of 10. When I press 1 however, it’s subtracting all my health, not an increment of 10. Any thoughts?
Your order of operations is wrong. You’re subtracting the health from the damage vice the damage from the health. Essentially you’re doing (damage - health) instead of (health - damage). Move health to the top pin.
1 Like
YUP. Thank you!
I strongly recommend you create a strict function that takes a value for the deduction. You can then simply take any value passed from apply damage directly to func.
Have this function set your player state health variable. Set your PS health as a rep_notify.
The pawn can then have a local health var. When the onrep function fires have it update the pawns health var.
Use the pawns health var in UI.
1 Like