I am trying to, on player logout (either they closed game, or got disconnected), store the actor location of their character.
I have tried two built in method overrides:
- AGameMode::Logout(AController * Exiting)
- APlayerController::EndPlay(const EEndPlayReason::Type EndPlayReason)
In either method, when I get the pawn or character from the controller it seems to already have been destroyed by the time this method is called so it is null.
Does this sound right to you? And if so, is there any other way to get the player’s last position on logout? Or do I just need to cache that somewhere (perhaps player state) on a recurring interval if I want to read it on logout?
Any help would be greatly appreciated!