Players spawning in wrong order after 1st game

Hello,

I’m currently working on a Local Multiplayer game, The problem I’m encountering is that once the first game is done (wether you play the entire map or restart) the players will spawn in the wrong order in subsequent games.

What happens is that every time a map starts, I make an array of all Players in the scene, at first Player 1 is correctly in the index 0 of that array but after a restart, Player 1 is in position 1 of the array and player 2 is in position 0.

This is causing problems because I need the players to spawn in the correct order for systems like the score screen and I’m stumped. I have no idea how to fix this, to a point where i dont even know what screenshots i should show you for help.

we do use Get All to find the third person characters that have been spawned for quite a few things. notably in the level blueprints when we set up where each players ‘base’ is. which is what breaks the most

I make an array

What are you using for this?

  • Make Array - OK!
  • Get All - Bad!

The latter does not guarantee element order.

we do use Get All to find the third
person characters that have been
spawned for quite a few things.
notably in the level blueprints when
we set up where each players ‘base’
is. which is what breaks the most

That’d be the first thing to investigate; it does not need to be fancy. Give each player a unique ID, 0,1,2,3 and then:

Or, perhaps you already have another ID system in place.