Hello. I’ve been working on a player respawn system and I’ve run into a roadblock. For some reason, the player controller doesn’t repossess the respawned pawn of the player who died, but instead it repossesses the player who killed and respawns another pawn. I am confusion.
Looks like every time a character dies, you are triggering respawn for PlayerController0 on the server. PlayerController0 isn’t really meaningful on server, it could be anybody. You probably want to respawn the player who died instead. Use “Get Owning Player” to get the playercontroller associated with this character.
Side note : checking for Authority in GameMode class is useless, GameMode does not exist on Remotes.
Important note : that Delay node is gonna cause problems. If the RespawnRequested event is triggered twice in less than the Delay duration, you’re gonna have another interesting mixup to debug. This delay seems useless, remove it.
I see “Get Owner” from the player controller, but not “Get Owning Player” by itself.
Where am I using this “Get Owning Player”, is what I’m asking.
Use “Get Controller” and cast to PlayerController if needed
Easiest approach is to simply unpossess and then after a set time, teleport the pawn to respawn location, reset the pawn (turn off ragdoll effects), then possess it.
The Game Mode has to do this.