Player Controller null after RestartPlayer()
I have a simple multiplayer game. When my player dies, the server calls a Player::Die() function which includes this code:
Later my GameMode iterates through the player controllers and sees that he is dead (
After restarting the player, the
When the player first spawns (before dying) this value is not null in BeginPlay(). But after he dies and the GameMode restarts him, the Controller value is null in his BeginPlay().
Is there any reason why this would happen?
asked Feb 16 '18 at 08:28 PM in C++ Programming
Found the answer I was looking for.. you need to override virtual function:
This is where you would want to do something like attach weapon to first person mesh after respawning.
answered Feb 19 '18 at 02:09 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here