Respawn funcionality in blueprints

I would like a respawn functions in gamemode blueprints.
Right now it is a very tricky and for example I cannot set the player controller class when respawn a new actor.

I am talkink about Respawn the main character with the same parameters that they are in the GameMode.
I want to call the function that spawn the main character the first time that you play the game.

You can’t change the Player Controller for a player at runtime regardless, too many things rely on them being where they are. I can’t think of a scenario where you should ever have to change the Players’ controller anyway.

You can set the Pawn for a player anytime you like, and to restart a player all you have to do is call ‘RestartPlayer’ in the Game Mode and they’ll spawn with a new default pawn.

If you want to be able to change a “controller genre”, you can make it into component and swap them in any time.

‘RestartPlayer’ ?

Where is that function?

I don’t wanna change Player Controller, but if you follow this link:
https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/RespawnPlayer/Blueprints/index.html

Before to destroy the death character, the new spawner character have a default player controller, I wanna set the same player controller that I use in my Game Mode.

Weird that it’s not exposed to Blueprints. I guess that’s C++ only then.

You need to call ‘Possess’ on the Player Controller to make it possess the new pawn.

yes, very Weird, This is why i put this request in feedback. This is a basic función in many games.

Yes, spawn the new character and posses, that part is ok.

But the new spawned character have a default player controller class no my Custom blueprint player controller class (myplayercontroller), and there is not way to do it.

when the game start MyplayerController is assigned but before the first death, i cannot set MyplayerController in my new spawner character.

Thanks anyway :slight_smile:

Just at final clarification,

I am talkink about Respawn the main character with the same parameters that they are in the GameMode.
I want to call the function that spawn the main character the first time that you play the game.

I believe it isn’t exposed because it does more than just spawn a new pawn and re-posses it, which is why Respawning functionality is something you have to do yourself. There’s not really any one way that people do respawning, some people have a countdown, some do it instantly. This way is easier and more flexible.

Also, you set the default controller for a Pawn in the Pawn itself. Some Controllers need to have different logic depending on the Pawn they’re controlling, so it makes more sense to set it there. The Player Controller Class in the GameMode only determines the controller type for human players.

actual respawn default pawn + possess is not that much different from project to project.

I am talkink about Respawn the main character with the same parameters that they are in the GameMode.
I want to call the function that spawn the main character the first time that you play the game.

I am talking about Respawn the main character when die in a sigle player game. I have not problem about spawn, respawn IA, and set IA controllers.

I can put a delay before to call the function, or not.

And the more important set the player controller. And this cannot set in gamemode blueprint.