Hey, i need help with getting the number of players for my multiplayer lobby.
I red on the internet that i should use the Player Array in the game state, so i tried this:
You setting Total Players only once, when GameMode object is created and “BeginPlay” is called, at that point there no any PlayerController is initated so it will return 0 and because you do it only once at begining it will stay at 0 forever.
You can use “Get Number Players”, but then you can’t just give every Player the same number, like said.
But you can use a For Loop from 0 to “Get Number Players” and assign in every Loop another Player.