When is APawn::Restart called? What does the documentation mean by "usually"?

The documentation here:

Says APawn::Restart gets called as follows:


Called when the Pawn is being restarted (usually by being possessed by a Controller).

What does it mean by “usually”? Anyone know what the cases are where APawn::Restart will get called when not being possessed by a Controller?

Is there a standard and reliable way to know when possession of a Pawn has begun on the client?

You can override the APawn::PossessedBy(AController* Possesser) function, which will be called when the Pawn is possessed.

1 Like

Yeah I’ve seen that one, but it says it is only called on the Server (I know I can make my own RPC to then send it to the client, but surely that is already happening somewhere else, since the client has to know eventually).

APawn::PossessedBy(AController* Possesser) won’t be called on the Client unless they own that pawn, because only the players’ local controller exists on the client.

I believe RestartPawn is also called when a pawn is initially spawned. The simplest way to find out would be to search for calls to it in the APawn class. If you have VAX installed, you can use Shift + Alt + F to find all references to that function (it’s must better than intellisenses attempts).