So what I need to do is possess a pawn (in this case a vehicle) but have it unpossess and not be destroyed when the player exits or disconnects.
That way the vehicle can be possessed by another player in MP for example.
Problem is the vehicle is destroyed before the controller so there is no easy way of doing that with BP.
There should be an easy way for something like this… it’s a pretty common thing to do
As a connoisseur of Pawn Possession problems previously, I can tell you that Possession has been fixed in Multi-player in 4.8 thanks to Zak Middleton
The threads that Geodav linked to contain temporary work-arounds for the meantime though, I’m just gonna wait for the 4.8 Pre-release and keep busy with something else in the meantime.
It sounds like you didn’t understand my problem though!.. I have no issues with possessing/unpossessing in multiplayer! the problem comes when a player exits the game WHILE possessing the vehicle… which causes the vehicle to despawn… it’s the hard-coded behavior unfortunately.
I do not see anyone talk about this problem in any of those links(?) I hope I didn’t miss it somehow lol (if I did then my apologies… just point me to the right direction)
EDIT: Found the responsible code, here in APlayerController.cpp
Essentially, you can add your own code here, checking/casting the pawn against the types you’ve created, then choose whether to call destroy or not :). It’s a virtual function, so you can override it in your own PlayerController class.