Hello.
I placed two differents PlayerStart in my scene.
When I launch the game, my players are spawned randomly on Playerstart1 or Playerstart2.
I already created a custom playerController, custom gameMode, custom GameState but I can’t find where to specify on which playerStart to spawn.
I tested to teleport the players at the beginning to a specific PlayerStart so I created a public variable (PlayerStart type). But it doesn’t show up in the Defaults tab. So I can’t link a PlayerStart actor to my Player Blueprint.
TL;DR : I want to choose where to spawn my players.
If it were me, I would actually do something along these lines:
On the player, create a variable called: spawnPointID of type int
On the level blueprint, create an array of your spawnpoint (order matters)
On the player, @event begin play>Get spawnPointID>Get index(spawnPointID) from Spawn Point Array Level BP>Get position of element>Set player position to the position of element.
One advantage here is the ability to use triggers to cause your player to spawn at certain areas, which is useful if say, going through a door loads a level and the player needs to start at a certain point in the level. Just set the player spawnPointID when it is triggered, and then load your level.
I found a solution that seems to work for my project, give the playerstarts seperate object names and pull of the player controller → find playerstart (insert correct name) → getactortransform->spawn player.
-SamuelB