How would i go about setting this up, I have playerstarts and my players will choose randomly and join or re spawn. This is a multiplayer setup, I would like to have the player spawn an actor, this actor would have blueprint to make that actor now the respawn location, instead of using those original playerstarts…
Confused on how to link that player spawned actor to only him, and not others, aswell as how to get the spawned actor to before the new personalized playerstart.
Is this possible with blueprints? Was thinking if each player has unique identifier could use that in playerstart tag to reference ?
/**
* Called during RestartPlayer to actually spawn the player's pawn, when using a start spot
* @param NewPlayer - Controller for whom this pawn is spawned
* @param StartSpot - Actor at which to spawn pawn
* @return a pawn of the default pawn class
*/
UFUNCTION(BlueprintNativeEvent, Category=Game)
APawn* SpawnDefaultPawnFor(AController* NewPlayer, AActor* StartSpot);
/**
* Called during RestartPlayer to actually spawn the player's pawn, when using a transform
* @param NewPlayer - Controller for whom this pawn is spawned
* @param StartSpot - Actor at which to spawn pawn
* @return a pawn of the default pawn class
*/
UFUNCTION(BlueprintNativeEvent, Category=Game)
APawn* SpawnDefaultPawnAtTransform(AController* NewPlayer, const FTransform& SpawnTransform);
In the GameMode blueprint/class there’s a overridable function called “ChoosePlayerStart” and similar functions like this. Put your Spawn Transform in there.