Download

[Networking] Destroy Actor, Then Possess Spectator Upon Death

I’ve been hammering at this for hours and cannot find a working solution. Currently I have everything working in networking such as a team select and players spawning in, but I cannot for whatever reason get a client to possess a spectator pawn.

The results I get so far are one of the following depending on how it’s setup:
Server pawn/actor gets destroyed, server possessed spectator, client still has control of original
Server pawn/actor not destroyed, client pawn/actor destroyed but does not possess new spectator pawn
Server pawn/actor not destroyed, client pawn/actor destroyed, server possessed spectator

What I have noticed, when I print out the playercontroller names for each player spawned in, when I apply damage to the client and the event for death is triggered, the server’s playercontroller is always the one that is returned for possessing the new spectator pawn. That is confusing me as to why that is since I pass along the player controller in the EventAnyDamage to the death event.

If anyone has any ideas or suggestions I would be greatly appreciative!