Setting/Increasing MaxHealth

I have a couple Actors that either increase CurrentHealth or increase MaxHealth. I have CurrentHealth capped at 100(MaxHealth), when I pick it up I’m having it display a message whether it succeeded or failed (Success if CurrentHeralth < 100, Failed if CurrentHealth >= 100). This part seems to work ok since it does allow me to pick up health until I reach 100.

The problem is I’m not sure if I’m actually increasing MaxHealth when I pick up that item. When I collide with MaxHealth I have it display a message whether it failed, same as before. I also have it print the new MaxHealth value, which it does correctly. I also made an event so that if I press ‘1’ or ‘2’, I can print CurrentHealth and MaxHealth respectively. The issue that this way it only seems to print the default value for Max Health, yet CurrentHealth Updates normally (up until 100). So I’m not sure if it’s actually registering that MaxHealth is increasing.

Of course I want to be able to pickup another CurrentHealth item after increasing MaxHealth, but I can’t.

Here’s an example:
The Red text is the MaxHealth, and the blue text is CurrentHealth

I have a similar setup as you. I have a mushroom that when the player runs over it, it sets their max health +100, then sets their current health to the max health. The setup is simple and looks like this.

The ++ is an increment node. If you insert BankAccountBalance into a ++ node, it will increase it by 1, so you will have BankAccountBalance+1.
what you are doing is adding 2 variables, inputing that into the increment node and… I don’t know what happens. But it doesn’t work. Remove the ++ node and insert the addition node into the “set current max health” node.
Also, the other problem is how you’re debugging it. Of course it may be fixed with this change, but let’s say you connect the print string to the addition node. You will then see an incorrect number printed.
That is because you are setting the MH (say 100) by (say 25) so MG will = 125.
But then when you print, you print the addition node. Which again adds MH (125) + 25= 150.
So MH will be 125, but will print 150.
So do pay attention to what you are printing. You should print the variables directly, not the addition algorithm (unless debugging that way).
So print the value of MH.

You’re using a ++ node and a “set” node and I don’t know how ++ node behaves when you plugin math expression into it.

Simply remove the ++ node and set the current value of Max Health equal to the result of your Math Expression (Max Health + Increase Health).

Make sure IncreaseHealth is not equal to 0.

This is how I had it before, but it didn’t work. I just changed it back now and I’m still getting the same result.

The boolean variable “Is+MaxHealth” might be false (you should remove any special characters in variable/event/function names).
The int variable “IncreaseHealth” might be equal to 0.
You may not be printing the correct value or not printing correctly at all (I see a wire going out of the screen on your image, I hope it’s not your print because you can’t print something from another execution flow).

Through pm’s, Echosyp helped me figure it out.

For one, I wasn’t properly casting back to the player character. Also, for some reason I didn’t even create those variable in the actual player BP, so it wasn’t printing the correct values.

The attached is what I ended up with.