you could spawn in an actor and call your character and then possess it, for where to spawn that’s all up to you
Basically the question. I read through multiple Questions like this already without finding a solution. The Game is singleplayer
Hi, so first you need a logic to kill the player like: get Z position , or check if overlaps some box where you want.
To Check player Z location:
.1 Create a FVector someName=GetActorLocation();
.2 Create a if like: if(someName.Z<10){…Kill then Spawn …}
To Kill make the way you want some like:
.1 blood screen with the text You died the press a button “Spawn”
To Spawn make like this:
.1 Create a FVector someThing=FVector(10.f,0.5f,100.f); //this is to New Spawn Location and the numbers are only a EXAMPLE check (FVector | Unreal Engine Documentation).
.2 Create a FRotator someABC=FRotator(20.f,10.f,50.f); //To set the rotate and the numbers are only a EXAMPLE check (FRotator | Unreal Engine Documentation).
.3 To Spawn like this: GetWorld()->SpawnActor(GetClass(), someThing, someABC); //this line must be on the actor class that you want to spawn. Check this (UWorld::SpawnActor | Unreal Engine Documentation).
A last thing after spawn dont forget to destroy your player, so Just call Destroy();