How to avoid engine destroy the character when player leave or get disconnect

You can detect player leave and join using those events in GameMode class:

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AGameMode/K2_OnLogout/index.html
https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AGameMode/K2_PostLogin/index.html

In C++ you got better selection of events on each state of player joinging, you can override engine code so there possibility to do it a lot smother.

Store the last location or last checkpint of player and restore it when he is back. Problem is how you gonna track if connecting player is the old one, i’m not sure if that possible in blueprint, you need to find some unique ID, sadly onlinesubsystem blueprint bindings don’t have nessery things to use online service id for that

Also playercontroller has a function which destroys the possessed pawn, you can override it to prevent the destruction (just unpossess insted)

Sadly you can’t do that in blueprints

2 Likes