Hey everyone! Can somebody explain me how does it get past the “if” statement if the currentHealth isn’t 100 yet so it just kind of ignores the “if” statement (which will prevent the health to go more than 100) and sets itself to 100
just jumps for 60 to 100.
This does not happen if the i put nothing in that “if” statement than it regenerates normaly but it has no cap.
So i hope you get the idea.
Have you tried removing the semi colon on your if statement at line 9? The semicolon always stops a line of code so if you want the code within your if statement to run the semicolon is blocking it so that might well be why it’s acting so weird.
LOL! No problem glad it was a simple fix, capitalisations are also a constant annoyance you need to keep an eye out for or, currently, I’m dealing with code placement problems a lot.
Be sure to change your debug code like K1ng Zero said so you know everything is working too.