Why is my variable not updating?

I’m rather new to blueprints and am trying to figure out why my first HUD blueprint doesn’t seem to be updating.

Attached is my current blueprint. I’m trying to get stats from the player’s pawn that I created (it’s using the twin stick template) to populate the HUD variables. They’re divided against the max values to get a percent that I can use to bind against progress bars.

The actual experience I get is that the HUD variables will take on the “Current” versions of the pawn variables and never change. When I mouse over the pawn variables while the game is running, they state that the variables are out of scope.

This feels really basic so I’m sure I’m doing something wrong that’s very simple. Any help is appreciated. :slight_smile:

is the pawn being possessed at any moment? if not, hud class will never execute. also, at what moment are you updating CurrentActive, CurrentStorage and CurrentFirewall?

I believe so. I’m able to move the pawn from the twin stick example. The 3 “current” variables are set to their defaults, though CurrentStorage has a mapping to the F key to subtract 20 every time I press the button. According to mousing over in the Blueprint, it looks like that works correctly. All 6 variables are public, too.

Did you tell your Game Mode to use your HUD Blueprint?

If not create a new Game Mode set it in the World Settings than you can change around what gets used by default. You Probably using the default empty one. You can verify that by putting a Print String in your HUD if it does not show up you dont use the HUD.

Found the problem. I feel like an idiot. I used modulo instead of divide. Switching those out, I got the right numbers to show up in the hud.

Thanks!