Trouble with Integet and Float

Currently working on an hp and damage system. Made a float set to 3 at start then when I overlap anything that does damage to take one away and update the current widget. Kept having troubles with it and changed the blueprint a few dozen times trying to compensate for the change. I put in a print string at start to keep me updated on what the current health is reading and it keeps going from 3 - 0 - 3 - 0 ect until I take damage then it is 3 - -1 - 3 - -1 ect. The base variable is set to be three but keeps changing back to three. I figured that it must be colliding with something else so I took all collision off of it besides pawn and made sure that the eye shooting it does not collide with it and still got the same problem. Said ■■■■ it, turned off all collision for it and it is still happening.

tldr; Seems like float or integers are not updating when changing the numbers.

Little frustrated and still green when comes to blueprinting so go easy on me if its something simple :wink:

Only thing I noticed is before your first sequence your setting damage to false then in the branch above your checking if damage is true or false which is redundant as it will always be false because you just set it to false.

Therefore it will never be true.

Maybe that’s where your issue is ?

He’s actually setting Damage to True, so that’s probably not it (he sets Game Start to False on beginOverlap, which is suspicious on its own, but may be harmless as far as I can currently tell).
It’s redundant either way, since that branch is logically useless.

It’s rather impossible to help w/o the full BP, though - we can’t even see the code for the 3–0 prints you’re making, so it’s kinda hard to tell what may have went wrong.

Your right my bad. That is what I get for glancing at it… Defiantly need more then this small section then.

Props to Wax for the catch.

As a quick test, did you check through “Find References” all the times the variable is set and where? If the value is bouncing back to 3, there must be a condition setting it so. Also, as WaxOff says, there’s little chance to help with code we cannot see. Can you share that with us, please?