I need help


I was wonder how to fix/get around this issue I have Been having. As you can see I get a warning when I use “get owning player” and when I use “get player controller” my stamina bar stays blank and does not change. Any help would be appreciated

You can either leave the pin disconnected or connect a Player Controller.

when I use “get player controller” my stamina bar stays blank and does not change.

This issue is unrelated to what’s in the pic.

This is the only other code that I think could cause it is this


Test is a float variable set to 25 and the code goes into the percent.

this is tricky, but get owning player is a node used inside Widget Blueprints. To create a widget inside any other blueprint, you want to use “get player controller”. I’ve seen several examples of single player projects where the “create widget” node is not connected to any “get player controller”. For multiplayer games, the best place to create widgets is inside a custom player controller blueprint, in case you want to create widgets visible only for the local client.

Your stamina bar is blank because you have just created a widget, but next, first, you want to initialize the stamina values in your player character BP. Then, you need to update the widget information with the current stamina, and after every updates in the stamina values. The node Get Percent 0 should work.

I have tried to use get player controller but as I said earlier the stamina bar remains blank. I am relatively new to coding so I am not sure what is causing the issue

It’s hard to say, it can be caused by many factors. Who is assisting you on creating this logic? Are you following a tutorial?

Yes, here is the link
[https://youtu.be/jtJddy6zgqA?si=1jTmnBFpO5-Ya29q]

Thanks for the help btw

Based on what I could see, the tutorial should lead you to the desired results. You likely forgot to connect something in between. Use get player controller in the begin play node and get player character inside the WB-Stamina

Do you have duplicated blueprints called BP_Firstpersoncharacter in your project folder? If so, rename the second instance and replace the cast node inside the widget BP.

You may want to reach the developer (Gorka Champion), I believe he is active in this forum.

Thanks I’ll try it tomorrow

Are you playing with First Person BP or Third Person BP? Did you change the character in the Game Mode settings?

First person

He can walk you through and find a fix. Good luck in your project.

I figured out the problem. I was using a 1 in the get player character and a 0 in the get owning player. Thanks for the help.

1 Like