Widget switch won't change index.

Trying to make the hud appear different depending on what/where you click. For some reason my widget will not switch. The index is set in player controller and then the controller calls the event which takes that number and sets it to the new index.

It’s saying “accessed none”

Code

Any help appreciated, thanc.

Figured it out; instead of using the hud as the reference, I had to use the widget switcher as a ref. Then change it all in the player controller. Instead of changing the variable in player controller then calling for it in the hud.

You should use GetOwningPlayer instead of setting a new controller variable. Ensure that “Owning Player” is set when you call “CreateWidget”.

That wouldn’t work cause I need to pull the new index from the player controller

What Garner said should work. If you don’t want to do that, why not Get Player Controller and cast? Do you need to set a controller reference? It’s what causing you problems here, the ref is not set properly, or at all.

Figured it out; instead of using the hud as the reference, I had to use the widget switcher as a ref. Then change it all in the player controller. Instead of changing the variable in player controller then calling for it in the hud.