Going crazy here… Feels like I’ve tried everything.
I have a persistent level where you from a widget menu can select wich streaming level to load. In these I have autopossess on two different pawns that I want to be possessed depending on which level you select in the menu.
This works fine if I start one or more single player previews and click the menu buttons, the correct level is visible and the correct, autopossess, pawn is possessed.
But not when I run multiplayer, which I need to do.
Only the server selects the correct pawn and no matter what I do in blueprints, the client always refuses to possess the pawn I want it to possess.
I have tried forcing the possess in the start menu, in each level blueprint… Nothing works. No pawn is ever possessed by a client.
Surely it can’t be impossible to possess whatever pawn you want in client machines?
Hey there! I hope any of these things help, if not could you please describe what exactly you game is about or what do you want it to do and when and other details
Make sure that the pawns you want to possess are replicated. In Unreal Engine, only replicated objects can be accessed and controlled by clients. Check the “Replicates” checkbox in the Details panel for your pawns.
When you load a level in multiplayer, make sure that the server is the one handling the possession. You can use a “Run On Server” node to ensure that the server is the one executing the possess command.
Use a reliable multicast to inform all clients that a pawn has been possessed. When a pawn is possessed, it’s important that all clients are aware of this so they can update their local view of the game. A reliable multicast will ensure that all clients receive the message.
If all else fails, try using a different method for selecting and possessing pawns. For example, you could use an input event to select a pawn, and then possess it using a custom event that runs on the server.
if your have pawns with auto posses by player in your level, remove that pawns and replace with a player start or turn off the autoposses if u want to keep the pawns, in your gamemode (not gamemode base) in classdefault put your default pawn to none, and finally u control where to spawn or posses using the override fuctions in your gamemode