Quantcast
Channel: Recent Discussions — Photon Engine
Viewing all articles
Browse latest Browse all 15755

Numbered Players

$
0
0
I cannot figure out how to keep an array of player numbers. Each player has a PhotonNetwork.player.ID, but I cannot force it to only be from 1 to 4.
For instance if I have a max players of 4, and I check: if player is number 4 then turn the player red.
This works, but as soon as 4 disconnects all hell breaks loose. I cannot reassign the player numbers.

I guess my question is, How do I keep a list of players that can be indexed, and ensure It will never exceed the max player count?

Thanks for the help.

Viewing all articles
Browse latest Browse all 15755

Trending Articles