Download

Right Object to cast? UE5

Hello to everyone, I am creating this game which works well for server only play (singleplayer), but now that I am setting the MP, I get all weird errors, which was expected; however, I have set all my widgets on the “BP_PlayerBase” which is my player character blueprint, I have seen that I should set all my widgets on my “BP_GameController”, so I am doing that, but, I cant seem to send the variables from “BP_MainCharacter” to “BP_GameController”, this is because I can’t find the right object to cast into, any help would be appreciated. Workaround-Question,
I’ve read that I should be able to use the widgets of my “BP_PlayerBase”, for all of the clients too, but this doesn’t seem to work either
This is my BP_GameController


This is my BP_PlayerBase

Those are the errors

THANKS, EVERYONE FOR THE TIME IT TOOK TO READ ALL THIS MESS WITH BAD ENGLISH!

Yeah, I hate casting. Try plugging in get player character, unless you’re doing multiplayer (which I think you said you’re not doing).

to the contrary im trying to set the multiplayer, thanks anyway!

I have no idea what BP_PlayerBase is and I assume GameController is a PlayerController (if this is the case, I suggest not call it a GameController in the future as it can be misleading).

As for the first image, you are not casting anything. The object slot on the left on the ‘Cast To BP_PlayerBase’ needs to be connected to something. Depending on what BP_PlayerBase is, it could be a Pawn, which you can through the ‘Pawn’ or ‘GetPawn’ node, it could also be a ‘PlayerState’, which you can get from ‘GetPawn->GetPlayerState’.

player base is his character BP.

1 Like

l will learn interfaces and forget about this, thanks to everyone!