Hi I’m making simple multiplayer BR type game where for testing, there are 3 players in the arena and last player left wins. Everything seems to be working great except for the code determining which place you get. The following code is in my gamemode
blueprint.
The Player Died
event is called from the character blueprint and passed with the player controller. What this is supposed to do, is set the placement to how many people are left alive, and then remove the player controller from the list of who is left alive.
I’ve used print statements and determined that it is not properly removing the elements from the array. If there are 3 players in the game, it works for the first player to die and removes the player from the array. But it will not remove any more regardless if the other players die.
I printed the Display Name
for each element in the array and it shows:
Cube_PC2 Cube_PC1 Cube_PC Players alive: 3
After the first player dies, it then shows:
Cube_PC2 Cube_PC1 Players alive: 2
After, this it will not change these values so when the next player dies:
Cube_PC2 Cube_PC1 Players alive: 2
Any thoughts on why this would be? Thank you for any help!