When i put some Lyraplayerstart to world, they spawn randomly, how can i order to spawn? for example, i want me spawn to lyraplayerstart5, anyway to set this?
2 Likes
Iām also on the lookout of how to set this.
Does anyone know?
In TDM_PlayerSpawningManagmentComponent
:
Remove/comment out the entire loop for (APlayerState* PS : GameState->PlayerArray)
Replace with:
for (ALyraPlayerStart* PlayerStart : PlayerStarts)
{
if (FString::FromInt(PlayerTeamId) == PlayerStart->GetName().Right(1))
{
BestPlayerStart = PlayerStart;
}
}
Name your LyraPlayerStart with the desired team number at the end. E.g., LyraPlayerStart1 for Team 1, LyraPlayerStart2 for Team 2. Good for teams 0-9.
Should work.