Some problems with getting variable values.

Heya,

I created a Blueprint, “BP_Character” with some values, in this case HealthCurrent and HealthMax. I have set these too 75 and 100 as a default.

Then I created another Blueprint, “BP_Character_Player” as a child of “BP_Character”. And thus it inherits the variables HealthCurrent and HealthMax. When I play the game I use the “BP_Character_Player” to run around.

So far so good. Now I’m trying to display those variables to the screen and add some basic health regeneration to the player. This all works fine.

The problem is the HealthMax value, which should have a default value of 100, yet it always return 0. If i display it on screen, HealthCurrent will say 75, yet HealthMax will display 0. If I look at the value on some of the blueprint nodes I have, it will display 0 as well even though it should say 100.

Any insights as why this is? Why does HealthCurrent work and display correctly, yet HealthMax doesn’t. They are both the exact same variables apart from their names, yet one behaves differently than the other. Am i doing something wrong or missing something?

Thanks.

[edit]

Righto, It seems it was just a matter of me being stupid. Apparantly, while i was fooling around with the variables I made a few changes that i decided I wouldn’t go with. But i forgat about that part of the blueprint, so in the construction script, the pins had disconnected and was clamping my values to 0.

soo … yeah …