Hud text visibility doesn't change

I can see you try to Get Player Character and cast to PlayerController, this will always failed, so you will see no change.

Just change that to Get Player Controller and it should work.

I’m trying to create weapon loading indicator hud text. Basically I have two textblocks. One which says “ready” and another which says “loading”. I’m trying to use “canfire?” boolean from my character to decide which of these texts is shown.

But it doesn’t work. The text stays visible all the time. The boolean is working but the visibility doesn’t change. Below is screenshots from one of the functions.

Visibility to binded to function:

Function is like this:

I’m probably missing something really simple but no idea what it is.

I just remembered that I had changed my thirdpersonbp blueprint name to myplayercontroller. I changed it back and updated the screenshot. I’d be happy if you were willing to look at it again because I think the original name for my character bp was misleading.

I tried to do what you said but I get error: “‘ThirdPersonBP’ does not inherit from ‘Player Controller’. Cast to ‘ThirdPersoBP’ would always fail”. (is it possible to copy compiler results so I don’t need to manually type them here?)

I removed the binding function from the visibility and made it using the tick in the hud:


Now it works.

I’m not marking this as solved because I still have no idea why my original solution doesn’t work.

Strange, my suggestion is based on you misleading name and there’s nothing wrong with you code. So i also don’t know what wrong with it. But if this only binding have problem then Tick solution is fine

One thing you can do try to remove binding use Create Biding from widget, not create a new one in EventGraph then assign, then use your code. Also add one more output when Cast to ThirdPersonBP is Null. If not try to create a new widget and try in case your widget is corrupted somehow.

Thanks for response! I’ll try playing around with it little more.