Default pawn multiplayer

An adjustment is needed to the above instructions. Before calling RestartPlayer you first need to destroy the pawn you have. This is due to the following section of code in AGameModeBase

Essentially if the pawn you’re controlling is “alive” then instead of killing it and spawning a new one it simply moves it to the start position. To get the code we want to execute (GetDefaultPawnClassForController) we need to destroy the current pawn first.

With that in mind, the relevant BP pieces are…

MyGameMode_BP

MyPlayerController_BP

…and the result

2 Likes